diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-03-30 15:29:52 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-03-30 15:29:52 -0700 |
commit | 58c3ec1b7b7ee073edf9c245de5d06426be60a25 (patch) | |
tree | dbec3d32e77b38956379365577752199d198c5e3 /actionpack/lib | |
parent | 4f90b28e06589a51f4655e38e94c948aaf02d05f (diff) | |
download | rails-58c3ec1b7b7ee073edf9c245de5d06426be60a25.tar.gz rails-58c3ec1b7b7ee073edf9c245de5d06426be60a25.tar.bz2 rails-58c3ec1b7b7ee073edf9c245de5d06426be60a25.zip |
use assert_equal so we get normal error messages along with our custom failure message
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/assertions/routing.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/testing/assertions/routing.rb b/actionpack/lib/action_dispatch/testing/assertions/routing.rb index 11e8c63fa0..b760db42e2 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/routing.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/routing.rb @@ -46,7 +46,7 @@ module ActionDispatch expected_options.stringify_keys! msg = build_message(message, "The recognized options <?> did not match <?>, difference: <?>", request.path_parameters, expected_options, expected_options.diff(request.path_parameters)) - assert_block(msg) { request.path_parameters == expected_options } + assert_equal(expected_options, request.path_parameters, msg) end # Asserts that the provided options can be used to generate the provided path. This is the inverse of +assert_recognizes+. @@ -84,11 +84,11 @@ module ActionDispatch found_extras = options.reject {|k, v| ! extra_keys.include? k} msg = build_message(message, "found extras <?>, not <?>", found_extras, extras) - assert_block(msg) { found_extras == extras } + assert_equal(extras, found_extras, msg) msg = build_message(message, "The generated path <?> did not match <?>", generated_path, expected_path) - assert_block(msg) { expected_path == generated_path } + assert_equal(expected_path, generated_path, msg) end # Asserts that path and options match both ways; in other words, it verifies that <tt>path</tt> generates |