test/test_god.rb in god-0.7.7 vs test/test_god.rb in god-0.7.8

- old
+ new

@@ -376,18 +376,26 @@ def test_status_should_show_state God.watch { |w| w.name = 'foo'; w.start = 'bar' } w = God.watches['foo'] w.state = :up - assert_equal({'foo' => {:state => :up}}, God.status) + assert_equal({'foo' => {:state => :up, :group => nil}}, God.status) end + def test_status_should_show_state_with_group + God.watch { |w| w.name = 'foo'; w.start = 'bar'; w.group = 'g' } + + w = God.watches['foo'] + w.state = :up + assert_equal({'foo' => {:state => :up, :group => 'g'}}, God.status) + end + def test_status_should_show_unmonitored_for_nil_state God.watch { |w| w.name = 'foo'; w.start = 'bar' } w = God.watches['foo'] - assert_equal({'foo' => {:state => :unmonitored}}, God.status) + assert_equal({'foo' => {:state => :unmonitored, :group => nil}}, God.status) end # running_log def test_running_log_should_call_watch_log_since_on_main_log @@ -585,6 +593,6 @@ # God.expects(:test).returns(true) # assert_nothing_raised do # God.validater # end # end -# end \ No newline at end of file +# end