Testing routes and controller results

I’m trying to write a functional test that generates a route and then
follows that route to the controller and confirms that the appropriate
record is retrieved.

I’m getting some unexpected errors — I know the route works in
development mode – and wondering if anyone has an idea of what’s
happening here. Thanks for any help you can offer.

Here’s the test…

def test_show_title
get date_url(:title=>"#{@news.srctitle}",


and the error…

NoMethodError: You have a nil object when you didn’t expect it!
The error occured while evaluating nil.rewrite
actionpack-1.12.5/lib/action_controller/base.rb:488:in url_for' generated/routing/named_routes/date.rb:2:indate_url’
method_missing' ./test/functional/articles_controller_test.rb:33:intest_show_title’

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs