summaryrefslogtreecommitdiff
path: root/test/unit
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-08-29 09:41:12 +0200
committerAzul <azul@riseup.net>2016-08-29 09:41:12 +0200
commit58d687f927aabc8aa2fdfc46132cb71706bdde46 (patch)
tree5324fe4255437b1e1c050e1b2e087d3023ad22b5 /test/unit
parent16d77cc03068b19791e704abfc2eb14f8cd141f0 (diff)
refactor: split up ResponseHandler
Now we have a Dispatcher and two ResponseHandlers that have the same interface. Moving towards a Chain of Responsibility pattern.
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/dispatcher_test.rb (renamed from test/unit/request_handler_test.rb)10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/unit/request_handler_test.rb b/test/unit/dispatcher_test.rb
index d938706..60d252b 100644
--- a/test/unit/request_handler_test.rb
+++ b/test/unit/dispatcher_test.rb
@@ -1,7 +1,7 @@
require 'test_helper'
-require 'nickserver/request_handler'
+require 'nickserver/dispatcher'
-class Nickserver::RequestHandlerTest < Minitest::Test
+class Nickserver::DispatcherTest < Minitest::Test
def test_empty_query
handle
@@ -58,12 +58,12 @@ class Nickserver::RequestHandlerTest < Minitest::Test
def assert_response(args)
responder.expect :respond, nil, [args[:status], args[:content]]
- handler.respond_to @params, @headers
+ dispatcher.respond_to @params, @headers
responder.verify
end
- def handler
- Nickserver::RequestHandler.new responder
+ def dispatcher
+ Nickserver::Dispatcher.new responder
end
def responder