[rspec-users] should_receive working in before(:each) but not in example
mark at mwilden.com
Wed Sep 17 23:44:58 EDT 2008
On Wed, Sep 17, 2008 at 8:23 PM, Tim Haines <tmhaines at gmail.com> wrote:
> it "should update the original video and save the video" do
> post :upload_video, :video_id => 'hi', :Filedata => @video_file
> This fails saying that @vid didn't receive original=. However, if I move
> the two should's up into the before block, then the example passes.
Right. should_receive specifies what should happen in the future, not what
has happened in the past.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users