test/test_process.rb in god-0.13.4 vs test/test_process.rb in god-0.13.5

- old
+ new

@@ -10,11 +10,11 @@ raise "You forgot to stub exec" end end end -class TestProcessChild < Test::Unit::TestCase +class TestProcessChild < Minitest::Test def setup God.internal_init @p = God::Process.new @p.name = 'foo' @p.stubs(:test).returns true # so we don't try to mkdir_p @@ -43,10 +43,13 @@ def test_valid_should_return_true_if_uid_exists @p.start = 'qux' @p.log = '/tmp/foo.log' @p.uid = 'root' + ::Process.stubs(:groups=) + ::Process.stubs(:initgroups) + assert @p.valid? end def test_valid_should_return_true_if_uid_does_not_exists @p.start = 'qux' @@ -140,17 +143,18 @@ # # Daemon # ############################################################################### -class TestProcessDaemon < Test::Unit::TestCase +class TestProcessDaemon < Minitest::Test def setup God.internal_init @p = God::Process.new @p.name = 'foo' @p.pid_file = 'blah.pid' @p.stubs(:test).returns true # so we don't try to mkdir_p + God::System::Process.stubs(:fetch_system_poller).returns(God::System::PortablePoller) Process.stubs(:detach) # because we stub fork end # alive? @@ -241,10 +245,10 @@ @p.start = 5 @p.stop = 'baz' assert @p.valid? - assert_raise NotImplementedError do + assert_raises NotImplementedError do @p.call_action(:start) end end # start!/stop!/restart!