[rspec-users] having should_receive expectation for things that happen in setup
dchelimsky at gmail.com
Tue Feb 20 17:21:01 EST 2007
should_receive sets up expectations for things that will happen
subsequently. In your example, foo.msg gets called before
On 2/20/07, Esad Hajdarevic <esad at esse.at> wrote:
> The following example doesn't work for me: http://pastie.caboo.se/41732
> However, if the call to msg() happens in the specify block after the
> expecation and not in the setup, it will pass.
> Why is this? I thought the setup method was there to actually
> 'construct' the context and the specifications are some kind of
> "postconditions" that only need to be validated after that - am I
> thinking wrong here?
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users