I am trying to mock a view helper with rspec2. The old way to do this is throwing an error complaining that the template object is undefined:
template.should_receive(:current_user).and_return(mock("user"))
Am I missing something, or is it not implemented in rspec2 (yet)?
ruby-on-rails rspec
Hakan ensari
source share