Forum: Ruby on Rails Strang Behavior when testing Routes

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

    :controller => 'user/version',
    :platform_filter => /all/,
    :platform => /windows|macintosh|unix|linux/,
    :distribution_channel => /Download|download/,
    :action => 'download',
    :id => /\d+/

Here is my test for this route

  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)


The test passes without failure!  However, if I comment out the
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.