Hi --
I'm having trouble calling named routes in functional tests. Given this in routes.rb
map_resources :tags
and this in my tags functional tests:
def test_route tags_url # just calling it end
I get this:
1) Error: test_route(TagsControllerTest): NoMethodError: You have a nil object when you didn't expect it! The error occurred while evaluating nil.rewrite /home/dblack/hacking/scratchpad-rest/config/../vendor/rails/actionpack/lib/action_controller/base.rb:519:in `url_for' (eval):19:in `tags_url' /home/dblack/hacking/scratchpad-rest/config/../vendor/rails/actionpack/lib/action_controller/test_process.rb:438:in `method_missing' tags_controller_test.rb:15:in `test_route'
519 in base.rb is:
def url_for(options = {}, *parameters_for_method_reference) case options # some when clauses... when Hash @url.rewrite(rewrite_options(options)) # 519 end end
The same thing happens if I do this in the application console.
Any suggestions/ideas?
David