[rspec-devel] rake aborted! when setting expectations in before

Mark Van Holstyn mvanholstyn at gmail.com
Tue Oct 9 01:17:02 EDT 2007

On 10/9/07, David Chelimsky <dchelimsky at gmail.com> wrote:
> Thanks - sadly that doesn't tell me much.
> You said you think it's because you're setting expectations
> before(:each) example.

That is why...

Have you tried moving this line:
> User.should_receive(:new)
> directly into the examples? Different result?

Yes, This resolves the rake aborted problem. I have some places however
where it would be preferable to keep these calls in the before(:each) block.

Also - the expectation is that User.should_receive(:new), but it
> doesn't return anything - so I wonder what's going in in the code.
> Would you mind posting the full spec and code? At least the failing
> spec (w/ before, etc) and the action it is going after.

This was just a contrived example (but when running this contrived example,
the specs "pass" and I get "rake aborted").


Mark Van Holstyn, Partner / Software Developer
mvanholstyn at mutuallyhuman.com, (616) 706-6842
Mutually Human Software, http://mutuallyhuman.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20071009/d1512ee5/attachment.html 

More information about the rspec-devel mailing list