Skip to content

Commit 180eb8f

Browse files
committed
no need for assert_block
1 parent 48ed7e6 commit 180eb8f

File tree

1 file changed

+3
-3
lines changed
  • actionpack/lib/action_dispatch/testing/assertions

1 file changed

+3
-3
lines changed

Diff for: actionpack/lib/action_dispatch/testing/assertions/response.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ def assert_response(type, message = nil)
2929
validate_request!
3030

3131
if type.in?([:success, :missing, :redirect, :error]) && @response.send("#{type}?")
32-
assert_block("") { true } # to count the assertion
32+
assert true # to count the assertion
3333
elsif type.is_a?(Fixnum) && @response.response_code == type
34-
assert_block("") { true } # to count the assertion
34+
assert true # to count the assertion
3535
elsif type.is_a?(Symbol) && @response.response_code == Rack::Utils::SYMBOL_TO_STATUS_CODE[type]
36-
assert_block("") { true } # to count the assertion
36+
assert true # to count the assertion
3737
else
3838
flunk "Expected response to be a <#{type}>, but was <#{@response.response_code}>"
3939
end

0 commit comments

Comments
 (0)