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

David Chelimsky dchelimsky at gmail.com
Tue Oct 9 09:50:09 EDT 2007


On 10/9/07, Brandon Keepers <bkeepers at gmail.com> wrote:
>
> 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)

That might get it to work, but this behaviour is very odd. Also, I am
not able to duplicate the behaviour at all.

David

>
> Brandon
>
>
> _______________________________________________
> rspec-devel mailing list
> rspec-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-devel
>


More information about the rspec-devel mailing list