From 7e6306d443add62ca2a0588c3876d156f39c5b80 Mon Sep 17 00:00:00 2001 From: Markus Doits Date: Mon, 6 Sep 2021 16:57:02 +0200 Subject: [PATCH] update tests for multiple hook calls --- test/test_config.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/test_config.rb b/test/test_config.rb index d4e2443661..ecc79c8d0a 100644 --- a/test/test_config.rb +++ b/test/test_config.rb @@ -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