Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix test_path_not_found so that it will indeed fail if the router is …

…given an unknown path. Also change the test path to make it more obvious that the given path should not be recognized.
  • Loading branch information...
commit 72477988ebd9440a6ab9ab368f945f8ed3bd35ef 1 parent b0ef9f1
Jeff Cohen authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/test_router.rb
View
4 test/test_router.rb
@@ -257,11 +257,11 @@ def test_path_not_found
"/messages/:id/edit(.:format)",
"/messages/:id(.:format)"
]
- env = rails_env 'PATH_INFO' => '/messages/1.1.1'
+ env = rails_env 'PATH_INFO' => '/messages/unknown/path'
yielded = false
@router.recognize(env) do |*whatever|
- yielded = false
+ yielded = true
end
refute yielded
end
Please sign in to comment.
Something went wrong with that request. Please try again.