[rspec-users] autospec fails but rake spec tasks pass (solution)

jakepaul dotjake at gmail.com
Sat Mar 28 23:05:53 EDT 2009

I figured out what the problem was. Turns out that the controller specs used
Mocha's any_instance method to stub valid? and return false (I got this idea
from a Railscast). Due to the order in which autospec runs the specs,
editing the model spec was causing it to be run after the controller spec,
and the Mocha stubs were still being applied in the model specs. I'm not
sure if I was doing something wrong, if there is some way to 'clear' the
stubbed methods that would be great, or perhaps I just shouldn't use
View this message in context: http://www.nabble.com/autospec-fails-but-rake-spec-tasks-pass-tp22746792p22763942.html
Sent from the rspec-users mailing list archive at Nabble.com.

More information about the rspec-users mailing list