module Test::Unit::Notify
Constants
- VERSION
test-unit-notify version number formatted as “#\{MAJOR}.#\{MINOR}.#\{MICRO}”.
Public Instance Methods
disable()
click to toggle source
Disables test result notification by default. It can be disabled by `–notify` command line option.
# File lib/test/unit/notify.rb, line 48 def disable @@enable = false end
enable()
click to toggle source
Enables test result notification by default. It can be disabled by `–no-notify` command line option.
# File lib/test/unit/notify.rb, line 42 def enable @@enable = true end
enable=(enable)
click to toggle source
@deprecated Use {Notify.enable} or {Notify.disable} instead.
# File lib/test/unit/notify.rb, line 53 def enable=(enable) self.default = enable end
enabled?()
click to toggle source
@return [Boolean] return whether test result notification
is enabled or not.
# File lib/test/unit/notify.rb, line 59 def enabled? @@enable = Notifier.available? if @@enable.nil? @@enable end
setup_auto_runner(auto_runner, enable=nil)
click to toggle source
@private
# File lib/test/unit/notify.rb, line 65 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