Skip to content

Commit

Permalink
update tests for multiple hook calls
Browse files Browse the repository at this point in the history
  • Loading branch information
doits committed Sep 6, 2021
1 parent c15a6b0 commit 7e6306d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/test_config.rb
Expand Up @@ -366,13 +366,17 @@ def assert_run_hooks(hook_name, options = {})
messages = []
conf = Puma::Configuration.new do |c|
c.send(configured_with) do |a|
messages << "#{hook_name} is called with #{a}"
messages << "#{hook_name} is called with #{a} for one block"
end

c.send(configured_with) do
messages << "#{hook_name} is called without an arg for another block"
end
end
conf.load

conf.run_hooks hook_name, 'ARG', Puma::Events.strings
assert_equal messages, ["#{hook_name} is called with ARG"]
assert_equal messages, ["#{hook_name} is called with ARG for one block", "#{hook_name} is called without an arg for another block"]
end
end

Expand Down

0 comments on commit 7e6306d

Please sign in to comment.