Module: Tlb::TestUnit::TestObserver
- Defined in:
- lib/tlb/test_unit/test_observer.rb
Defined Under Namespace
Classes: TestUnitRunData
Instance Method Summary collapse
Instance Method Details
#register_observers ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/tlb/test_unit/test_observer.rb', line 17 def register_observers run_data = TestUnitRunData.new add_listener(Test::Unit::TestResult::FAULT) do |fault| run_data.suite_failed(fault) end add_listener(Test::Unit::UI::TestRunnerMediator::FINISHED) do |*elapsed_time| run_data.report_all_suite_data end add_listener(Test::Unit::TestSuite::STARTED) do |suite_name| run_data.suite_started(suite_name) end add_listener(Test::Unit::TestSuite::FINISHED) do |suite_name| run_data.update_suite_data(suite_name) end end |