Displaying 2 results from an estimated 2 matches for "filmscontrollertest".
Did you mean:
films_controller_test
2006 May 09
1
name_url in tests
...ng tests.
dorian
Test:
# named routes
opts = { :action => "dotest", :test => "test1" }
assert_recognizes opts, taste_url(:action => "dotest", :test => "test1")
Error ( I have a route named ''taste''):
test_routes(FilmsControllerTest):
NoMethodError: You have a nil object when you didn''t expect it!
The error occured while evaluating nil.rewrite
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:461:in `url_for''
generated/routing/named_routes/taste.rb:2:in `taste_url''...
2006 May 08
0
testing named routes
...nd
and my test:
opts = { :controller => "films", :action => "index", :index => "indexdate.html" }
assert_routing overviews_url(:controller => "films", :index => "indexdate.html"), opts
which gives me:
2) Error:
test_routes(FilmsControllerTest):
NoMethodError: You have a nil object when you didn''t expect it!
The error occured while evaluating nil.rewrite
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/base.rb:459:in `url_for''
generated/routing/named_routes/overviews.rb:2:in `overviews_url'...