[rspec-users] Speccing a respond_to block outside of a request

Doug Livesey lists at ruby-forum.com
Thu Jul 24 09:35:15 EDT 2008


Hi -- I have a bunch of controllers whose index actions are so similar,
I can safely stick most of the code in a superclass.
I am having trouble, however, in speccing the index method in the
superclass.
It could look like this: http://pastie.org/240207

This is the class that the controllers that would actually get called
would inherit from.

I want to describe SuperController#index in a spec, so will need to be
able to manipulate the respond_to method -- any ideas on how i can do
this?
Also, it would be nice to spec that the before filter has been applied,
if there was a way, but the main thing is the index method.

Cheers for any & all assistance,
   Doug.
-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list