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:
parent
a37722182f
commit
89f315bfb2
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ module ActionDispatch
|
||||||
elsif type.is_a?(Symbol) && @response.response_code == Rack::Utils::SYMBOL_TO_STATUS_CODE[type]
|
elsif type.is_a?(Symbol) && @response.response_code == Rack::Utils::SYMBOL_TO_STATUS_CODE[type]
|
||||||
assert_block("") { true } # to count the assertion
|
assert_block("") { true } # to count the assertion
|
||||||
else
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue