Re: [rspec-users] RSpec2 error codes testing

2013-08-04 Thread Andy Lindeman
On 07/20/2013 08:20 AM, Robert Lis wrote: > I have an issue with testing error codes. If a record is not found, it > raises exception ActiveRecord::RecordNotFound. The thing is, I wanna > check if 404 is returned. If I go ahead and just check : > > response.status.should == 404 > > Then this wil

[rspec-users] RSpec2 error codes testing

2013-08-02 Thread Robert Lis
I have an issue with testing error codes. If a record is not found, it raises exception ActiveRecord::RecordNotFound. The thing is, I wanna check if 404 is returned. If I go ahead and just check : response.status.should == 404 Then this will make the test case fail as RecordNotFound exception is