[rspec-users] RESTful Routes

Raimond Garcia voodoorai2000 at gmail.com
Mon Feb 4 14:16:11 EST 2008

>> Hi,
>> I'm trying to test the behavior of a route with a delete method.
>> Something like this:
>> When "the admin clicks on 'delete'" do
>>    delete admin_blog_path(@blog)
>>  end
>> which raises the following exception:
>> NoMethodError: You have a nil object when you didn't expect it!
>> The error occurred while evaluating nil.env
>> Can you show the rest of the backtrace?
>> Sure, I'm using rspec 1.1.2, the backtrace is nice and clean, to  
>> get the
>> following, I commented out all the IGNORE_PATTERS, there is  
>> probably a
>> better way of doing it, but it worked.
> Sorry, but I can't really see anything related to rspec from the
> backtrace. I changed to a named route in one of my own steps and it
> worked fine. Can you try doing this in a rails integration test and
> see if you have a different result?
Will do.

Thanks for the fast replies!

> ------------------------------

More information about the rspec-users mailing list