Sha256: c4a93953a303f55176170da2841d99f32d9e5fbf25727d0c07f2ff4b6a76ce60

Contents?: true

Size: 648 Bytes

Versions: 5

Compression:

Stored size: 648 Bytes

Contents

#!/usr/bin/env ruby
require_relative './mock-helper'
require_relative '../../processor/command/quit'

class TestCommandQuit < Test::Unit::TestCase
  include MockUnitHelper
  def setup
    @name = File.basename(__FILE__, '.rb').split(/-/)[2]
    common_setup(@name)
  end

  def test_basic
    pid = fork { @cmd.run([@name, '10']) }
    Process.wait
    assert_equal(10, $?.exitstatus)
    pid = fork { @cmd.run([@name]) }
    Process.wait
    assert_equal(0, $?.exitstatus)
    # FIXME: should test that finalization routines get run;
    # should test 'confirm' gets run; and should test that
    # 'unconditional' is handled correctly.
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
trepanning-0.1.4 test/unit/test-cmd-quit.rb
trepanning-0.1.3 test/unit/test-cmd-quit.rb
trepanning-0.1.2 test/unit/test-cmd-quit.rb
trepanning-0.1.1 test/unit/test-cmd-quit.rb
trepanning-0.1.0 test/unit/test-cmd-quit.rb