[rspec-users] my helper stubs aren't working (rspec2, rails3)

Kevin Lochner lists at ruby-forum.com
Fri Dec 31 14:48:51 EST 2010

My helper tests broke when I upgraded to rails3/rspec2.  I don't seem to
be able to stub out methods in my helper tests.

Anyone know what's going on here?

describe UsersHelper do
  describe "the helper" do
    it "should stub" do
      helper.foobar_method.should == 666

gives me:

 1) UsersHelper the helper should stub
  Failure/Error: helper.foobar_method.should == 666
  undefined method `foobar_method' for #<ActionView::Base:0x4808014>
  # ./spec/helpers/users_helper_spec.rb:5

Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list