[rspec-users] update_attributes fails in rake spec but not in script/spec???

David Chelimsky dchelimsky at gmail.com
Sat May 1 07:36:33 EDT 2010

On May 1, 2010, at 2:29 AM, Patrick J. Collins wrote:

> Well, after some investigating, I discovered than another one of my spec files
> was causing this behavior.  When removing this other spec file, the one that
> was failing via rake spec no longer failed..  Totally bizarre.
> This is the spec that fails:
> http://gist.github.com/386129
> And this is the spec that when I delete, the other one that failed now passes:
> http://gist.github.com/386125
> This is so weird, I would really love it if someone could shed some light on
> this.

Hey Patrick,

This is just a guess, but on line 3 of http://gist.github.com/386125, ActionView::Helpers is being mixed in to the main object, which means it's methods are made accessible to every single object in the system. It's very likely that it is overriding methods that are deeper down the stack. Try moving that include statement inside the ExampleGroup (i.e. inside the describe block).

If that doesn't work, please run the specs with the -b flag, which produces a full backtrace, and then gist the output for us.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20100501/a7bbc1bb/attachment.html>

More information about the rspec-users mailing list