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

Brandon Keepers bkeepers at gmail.com
Tue Oct 9 08:19:50 EDT 2007


On Oct 9, 2007, at 1:17 AM, Mark Van Holstyn wrote:

> 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.


What about just stubbing the :new call in the before block and then  
setting the expectation in an example?

User.stub!(:new)

Brandon




More information about the rspec-devel mailing list