[cairo-commit] rcairo/test-unit/test/ui test_testrunmediator.rb, NONE, 1.1

Kouhei Sutou commit at pdx.freedesktop.org
Wed Aug 13 01:21:49 PDT 2008


Committed by: kou

Update of /cvs/cairo/rcairo/test-unit/test/ui
In directory kemper:/tmp/cvs-serv10416/test-unit/test/ui

Added Files:
	test_testrunmediator.rb 
Log Message:
* test-unit: imported Test::Unit 2.x.


--- NEW FILE: test_testrunmediator.rb ---
require 'test/unit/ui/testrunnermediator'

class TestUnitUIMediator < Test::Unit::TestCase
  def test_run_suite_with_interrupt_exception
    test_case = Class.new(Test::Unit::TestCase) do
      def test_raise_interrupt
        raise Interrupt
      end
    end
    mediator = Test::Unit::UI::TestRunnerMediator.new(test_case.suite)
    finished = false
    mediator.add_listener(Test::Unit::UI::TestRunnerMediator::FINISHED) do
      finished = true
    end
    assert_raise(Interrupt) do
      mediator.run_suite
    end
    assert(finished)
  end
end



More information about the cairo-commit mailing list