summaryrefslogtreecommitdiff
path: root/test/unit/handler_chain_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/handler_chain_test.rb')
-rw-r--r--test/unit/handler_chain_test.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/unit/handler_chain_test.rb b/test/unit/handler_chain_test.rb
index fae0418..1d79f18 100644
--- a/test/unit/handler_chain_test.rb
+++ b/test/unit/handler_chain_test.rb
@@ -2,7 +2,6 @@ require 'test_helper'
require 'nickserver/handler_chain'
class HandlerChainTest < Minitest::Test
-
def test_initialization
assert chain
end
@@ -12,14 +11,14 @@ class HandlerChainTest < Minitest::Test
end
def test_triggering_handlers
- handler_mock.expect :call, nil, [:a, :b]
+ handler_mock.expect :call, nil, %i[a b]
chain handler_mock
chain.handle :a, :b
handler_mock.verify
end
def test_returns_handler_result
- chain handler_with_nil, handler_with_result
+ chain handler_with_nil, handler_with_result
assert_equal :result, chain.handle
end
@@ -55,14 +54,14 @@ class HandlerChainTest < Minitest::Test
end
def handler_with_nil
- Proc.new {}
+ proc {}
end
def handler_with_result
- Proc.new { :result }
+ proc { :result }
end
def handler_raising(exception = RuntimeError)
- Proc.new { raise exception }
+ proc { raise exception }
end
end