[rspec-users] Confusion At Failing Specs

David Chelimsky dchelimsky at gmail.com
Fri Nov 7 17:06:58 EST 2008


On Fri, Nov 7, 2008 at 4:35 PM, Russell Norris <rsl at swimcommunity.org> wrote:
> Can someone please explain to me why this spec fails
>
> it "should work" do
>
>   template.stub!(:render)
>
>   template.should_receive(:render).with(:partial => "foo")
>
>   render @template_with_render_partial_foo

Can you put the rest of the spec and the view in? What failure message
are you getting?

>
> end
>
> but this spec passes
>
> it "should work" do
>
>   @foo.stub!(:bar)
>
>   @foo.should_receive(:bar).with(:baz)
>
>   @foo.bar :baz
>
> end
>
> It seems like they should work similarly and indeed this has worked for me
> until I switched to gem rspec-rails from vendor/plugin [recent]. Not sure
> what I'm doing wrong here.


More information about the rspec-users mailing list