test-unit-notify version number formatted as “#{MAJOR}.#{MINOR}.#{MICRO}”.
Disables test result notification by default. It can be disabled by @–notify@ command line option.
# File lib/test/unit/notify.rb, line 51 def disable @@enable = false end
Enables test result notification by default. It can be disabled by @–no-notify@ command line option.
# File lib/test/unit/notify.rb, line 45 def enable @@enable = true end
@deprecated Use {Notify.enable} or {Notify.disable} instead.
# File lib/test/unit/notify.rb, line 56 def enable=(enable) self.default = enable end
@return [Boolean] return whether test result notification
is enabled or not.
# File lib/test/unit/notify.rb, line 62 def enabled? @@enable = Notifier.available? if @@enable.nil? @@enable end
@private
# File lib/test/unit/notify.rb, line 68 def setup_auto_runner(auto_runner, enable=nil) auto_runner.listeners.reject! do |listener| listener.is_a?(Notify::Notifier) end enable = enabled? if enable.nil? auto_runner.listeners << Notifier.new if enable end