On Feb 4, 2008 10:49 AM, Raimond Garcia <[EMAIL PROTECTED]> wrote: > > On Feb 4, 2008 6:54 AM, Raimond Garcia <[EMAIL PROTECTED]> 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? _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users