Skip to content

Commit 3d62fc0

Browse files
authored
Merge pull request rails#53213 from davidstosik/sto/no-assertions
Fix "Test is missing assertions" in `middleware_stack_proxy_test.rb`
2 parents eaa6528 + ec9700a commit 3d62fc0

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

railties/test/configuration/middleware_stack_proxy_test.rb

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,16 @@ def test_order
6363
@stack.swap :foo
6464
@stack.delete :foo
6565

66-
mock = Minitest::Mock.new
67-
mock.expect :swap, nil, [:foo]
68-
mock.expect :delete, nil, [:foo]
69-
70-
@stack.merge_into mock
71-
mock.verify
66+
assert_playback([:swap, :delete], :foo)
7267
end
7368

7469
private
75-
def assert_playback(msg_name, args)
70+
def assert_playback(msg_names, args)
71+
self.assertions += 1
7672
mock = Minitest::Mock.new
77-
mock.expect msg_name, nil, [args]
73+
Array(msg_names).each do |msg_name|
74+
mock.expect msg_name, nil, [args]
75+
end
7876
@stack.merge_into(mock)
7977
mock.verify
8078
end

0 commit comments

Comments
 (0)