0
@@ -37,12 +37,6 @@ class TestWatch < Test::Unit::TestCase
0
assert_equal :unmonitored, @watch.state
0
- def test_mutex_should_return_the_same_mutex_each_time
0
- assert_equal @watch.mutex, @watch.mutex
0
@@ -132,6 +126,9 @@ class TestWatch < Test::Unit::TestCase
0
def test_move_should_not_clean_up_if_from_state_is_nil
0
+ Thread.current.stubs(:==).returns(true)
0
+ @watch.driver.expects(:message).never
0
@watch.instance_eval do
0
@@ -150,6 +147,9 @@ class TestWatch < Test::Unit::TestCase
0
def test_move_should_clean_up_from_state_if_not_nil
0
+ Thread.current.stubs(:==).returns(true)
0
+ @watch.driver.expects(:message).never
0
@watch.instance_eval do
0
@@ -170,12 +170,18 @@ class TestWatch < Test::Unit::TestCase
0
def test_move_should_call_action
0
+ Thread.current.stubs(:==).returns(true)
0
+ @watch.driver.expects(:message).never
0
@watch.expects(:action).with(:start)
0
no_stdout { @watch.move(:start) }
0
def test_move_should_move_to_up_state_if_no_start_or_restart_metric
0
+ Thread.current.stubs(:==).returns(true)
0
+ @watch.driver.expects(:message).never
0
[:start, :restart].each do |state|
0
@watch.expects(:action)
0
no_stdout { @watch.move(state) }
0
@@ -184,6 +190,9 @@ class TestWatch < Test::Unit::TestCase
0
def test_move_should_enable_destination_metric
0
+ Thread.current.stubs(:==).returns(true)
0
+ @watch.driver.expects(:message).never
0
@watch.instance_eval do
0
@@ -204,6 +213,9 @@ class TestWatch < Test::Unit::TestCase
0
def test_action_should_pass_start_and_stop_actions_to_call_action
0
+ Thread.current.stubs(:==).returns(true)
0
+ @watch.driver.expects(:message).never
0
c = Conditions::FakePollCondition.new
0
[:start, :stop].each do |cmd|
0
@watch.expects(:call_action).with(c, cmd)
0
@@ -212,6 +224,9 @@ class TestWatch < Test::Unit::TestCase
0
def test_action_should_do_stop_then_start_if_no_restart_command
0
+ Thread.current.stubs(:==).returns(true)
0
+ @watch.driver.expects(:message).never
0
c = Conditions::FakePollCondition.new
0
@watch.expects(:call_action).with(c, :stop)
0
@watch.expects(:call_action).with(c, :start)
0
@@ -219,6 +234,9 @@ class TestWatch < Test::Unit::TestCase
0
def test_action_should_restart_to_call_action_if_present
0
+ Thread.current.stubs(:==).returns(true)
0
+ @watch.driver.expects(:message).never
0
@watch.restart = lambda { }
0
c = Conditions::FakePollCondition.new
0
@watch.expects(:call_action).with(c, :restart)
Comments
No one has commented yet.