Navigation Menu

Skip to content

Commit

Permalink
Update test around HandlerMessenger for the current implenentation
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Jan 6, 2015
1 parent 2e75481 commit 2a07b63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
3 changes: 2 additions & 1 deletion lib/droonga/test/stub_handler_messenger.rb
Expand Up @@ -17,12 +17,13 @@ module Droonga
module Test
class StubHandlerMessenger
attr_reader :values, :messages
attr_accessor :engine_state
attr_accessor :engine_state, :cluster

def initialize
@values = []
@messages = []
@engine_state = nil
@cluster = nil
end

def emit(value)
Expand Down
8 changes: 1 addition & 7 deletions test/unit/plugins/system/test_status.rb
Expand Up @@ -28,7 +28,7 @@ def teardown
def setup_handler
@worker = StubWorker.new
@messenger = Droonga::Test::StubHandlerMessenger.new
@messenger.engine_state = StubEngineState.new
@messenger.cluster = StubCluster.new
@loop = nil
@handler = Droonga::Plugins::System::StatusHandler.new("name",
@worker.context,
Expand All @@ -45,12 +45,6 @@ def process(request)
@handler.handle(message)
end

class StubEngineState
def cluster
@cluster ||= StubCluster.new
end
end

class StubCluster
def all_nodes
[
Expand Down

0 comments on commit 2a07b63

Please sign in to comment.