Fix compiler warning due to missing function prototype.
[svn.git] / subversion / bindings / swig / ruby / test / test-unit-ext / always-show-result.rb
blobba1de320e30d37688113405f29d7e3245f3d8f21
1 require "test/unit/ui/testrunnermediator"
3 module Test
4   module Unit
5     module UI
6       class TestRunnerMediator
7         alias_method :original_run_suite, :run_suite
8         def run_suite
9           @notified_finished = false
10           begin_time = Time.now
11           original_run_suite
12         rescue Interrupt
13           unless @notified_finished
14             end_time = Time.now
15             elapsed_time = end_time - begin_time
16             notify_listeners(FINISHED, elapsed_time)
17           end
18           raise
19         end
21         def notify_listeners(channel_name, *arguments)
22           @notified_finished = true if channel_name == FINISHED
23           super
24         end
25       end
26     end
27   end
28 end