[rspec-users] need some advice on the best way to structure testable shared methods

Cynthia Kiser cnk at ugcs.caltech.edu
Mon Nov 14 21:22:50 EST 2011

Quoting Patrick J. Collins <patrick at collinatorstudios.com>:
> describe Bar do
>   it_behaves_like "a nameable thingie", Bar.new(nil, nil)
> end
> Which I don't like, mainly because Foo & Bar's initialize methods require
> arguments, and I am having to do (nil, nil) which seems very uncool...

Having trouble following your example. Why do you have to pass
Bar.new(nil, nil) for this test? 

Cynthia N. Kiser
cnk at ugcs.caltech.edu

More information about the rspec-users mailing list