We do something similar to this, though we use a convention to set
@klass to the class being spec'd in the top-level example group,
rather than deriving it as they do in that sample.
In view specs we also use a convention to always have a do_render
method available, so that we can bring in similarly shared / generated
examples.
It's great for speccing two sublcasses which have some common
behaviour, where it feels wrong to spec the (abstract) base class.
On 30 Sep 2008, at 12:09, Andy Freeman wrote:
I just stumbled upon this link this morning where Shoulda makes it
easy
to automatically load custom macros. Is there a similar feature in
RSpec?
http://technicalpickles.com/posts/shoulda-can-automatically-load-custom-macros
Andy
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users