Object
# File lib/test/unit/notify.rb, line 135 def available? not command.nil? end
# File lib/test/unit/notify.rb, line 139 def command @@command ||= commands.find {|command| command.available?} end
# File lib/test/unit/notify.rb, line 154 def attach_to_mediator(mediator) mediator.add_listener(UI::TestRunnerMediator::STARTED, &method(:started)) mediator.add_listener(UI::TestRunnerMediator::FINISHED, &method(:finished)) end
# File lib/test/unit/notify.rb, line 165 def finished(elapsed_time) command = self.class.command return if command.nil? title = "%s [%g%%] (%gs)" % [@result.status, @result.pass_percentage, elapsed_time] parameters = { :expire_time => 5, :icon => guess_suitable_icon, :urgency => urgency, :title => title, :message => @result.summary, } command.run(parameters) end
Generated with the Darkfish Rdoc Generator 2.