[rspec-users] Example controller spec no worky?

Brad Carson lists at ruby-forum.com
Wed Feb 13 14:09:47 EST 2008


Pat Maddox wrote:
> Try
> 
> Event.stub!(:find).and_raise(RecordNotFound)

To my credit, I did try that (though ActiveRecord::RecordNotFound, of 
course) but then I get:

EventsController attempt to show non-existing event
- should render 404 (ERROR - 2)
- should not assign an event (ERROR - 3)

ActiveRecord::RecordNotFound in 'EventsController attempt to show 
non-existing event should render 404'
ActiveRecord::RecordNotFound

Mind-boggling.
-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list