Forum: RSpec Confusion At Failing Specs

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
RSL (Guest)
on 2008-11-07 23:59
(Received via mailing list)
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

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.
This topic is locked and can not be replied to.