diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2011-04-22 19:37:52 +0200 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2011-04-22 19:38:01 +0200 |
commit | 89f315bfb287f5428e78195e7c93c85c0892ab64 (patch) | |
tree | 8c613bd98c3ec67c6c3d26d0e121b2d6301864b6 /actionpack/lib/action_dispatch | |
parent | a37722182fd96190f2317ffd0450c49ed6d406f0 (diff) | |
download | rails-89f315bfb287f5428e78195e7c93c85c0892ab64.tar.gz rails-89f315bfb287f5428e78195e7c93c85c0892ab64.tar.bz2 rails-89f315bfb287f5428e78195e7c93c85c0892ab64.zip |
We cant use assert_block because its buggy in MiniTest and wont actually show you the failure message you provide -- instead you just always get a "Expected block to return true"
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/assertions/response.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/testing/assertions/response.rb b/actionpack/lib/action_dispatch/testing/assertions/response.rb index 8a04cfa886..e209978fb7 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/response.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/response.rb @@ -42,7 +42,7 @@ module ActionDispatch elsif type.is_a?(Symbol) && @response.response_code == Rack::Utils::SYMBOL_TO_STATUS_CODE[type] assert_block("") { true } # to count the assertion else - assert_block(build_message(message, "Expected response to be a <?>, but was <?>", type, @response.response_code)) { false } + assert(false, build_message(message, "Expected response to be a <?>, but was <?>", type, @response.response_code)) end end |