Displaying 1 result from an estimated 1 matches for "stubcontroller".
2006 Jul 31
0
problems testing helpers - link_to and url_for don''t work...
...sing a helper. That example is a over simplified, but you get the
idea. Just moving duplicated links to a helper to keep things dry.
The issue seems to be that the controller is always nil by the time
url_for gets call in ActionController::Base - so something weird is
going on with trying to use StubController having to do with scope.
There are also issues I''ve had in getting the controller set up to
match what happens in a real request, with filters being run and what
not.
So I think a better solution would include:
- FooHelperTest uses FooController as its controller with its filters
run to...