Forum: Ruby on Rails Strang Behavior when testing Routes

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Steven (Guest)
on 2006-05-17 21:44
I have the following route:

[code]
map.connect
':platform_filter/:software/:version/:platform/:distribution_channel/:id',
    :controller => 'user/version',
    :platform_filter => /all/,
    :platform => /windows|macintosh|unix|linux/,
    :distribution_channel => /Download|download/,
    :action => 'download',
    :id => /\d+/
[/code]


Here is my test for this route

[code]
  def test_product_download_before_authentication()
    url = "all/matlab/r2006a/windows/download/1"

    opts = {:controller => "user/version",
                   :distribution_channel => "download",
                   :action => "download",
                   :version => r2006a,
                   :software => matlab,
                   :platform_filter => "all",
                   :platform => "windows",
                   :id => 1}
     assert_generates(url, opts)
     assert_recognizes(opts, url)
     assert_routing(url, opts)
    @request.env['PATH_INFO'] = url
    post(:download, opts)
    assert_response(:redirect)
    assert_template(nil)

  end
[/code]

The test passes without failure!  However, if I comment out the
assert_generates
and the assert_recognizes, the test fails.  I was under the impression
that assert_rounting is just a wrapper around assert_generates and
assert_recognizes so I'm totally confused by this.  Any insight from
others would be greatly appreciated.
This topic is locked and can not be replied to.