This project is archived and is in readonly mode.

#4799 ✓resolved
David Chelimsky

view test case returns a different object for every call to _view

Reported by David Chelimsky | June 8th, 2010 @ 08:21 PM

test "something on the view that needs a stub" do
  _view.stubs(:helper_method).returns("value")
  _view.method_that_calls_helper_method
end

This fails because _view returns a new object each time. This should be memoized for the duration of the test.

Patch forthcoming

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages