Object
@private
@return [Boolean] return @true@ if test result notification
is available.
# File lib/test/unit/notify.rb, line 163 def available? not command.nil? end
@private
# File lib/test/unit/notify.rb, line 168 def command @@command ||= commands.find {|command| command.available?} end
@private
# File lib/test/unit/notify.rb, line 188 def attach_to_mediator(mediator) mediator.add_listener(UI::TestRunnerMediator::STARTED, &method(:started)) mediator.add_listener(UI::TestRunnerMediator::FINISHED, &method(:finished)) end
@private
# File lib/test/unit/notify.rb, line 201 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.