[rspec-users] RESTful Routes

David Chelimsky dchelimsky at gmail.com
Mon Feb 4 12:12:18 EST 2008

On Feb 4, 2008 10:49 AM, Raimond Garcia <voodoorai2000 at gmail.com> wrote:
> On Feb 4, 2008 6:54 AM, Raimond Garcia <voodoorai2000 at gmail.com> wrote:
> 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?

More information about the rspec-users mailing list