1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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"

This commit is contained in:
David Heinemeier Hansson 2011-04-22 19:37:52 +02:00
parent a37722182f
commit 89f315bfb2

View file

@ -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