Module: Test::Unit::Notify

Defined in:
lib/test/unit/notify.rb,
lib/test/unit/notify/version.rb

Defined Under Namespace

Classes: Notifier

Constant Summary collapse

VERSION =

test-unit-notify version number formatted as "#{MAJOR}.#{MINOR}.#{MICRO}".

"1.0.4"
@@enable =
nil

Class Method Summary collapse

Class Method Details

.disableObject

Disables test result notification by default. It can be disabled by --notify command line option.



48
49
50
# File 'lib/test/unit/notify.rb', line 48

def disable
  @@enable = false
end

.enableObject

Enables test result notification by default. It can be disabled by --no-notify command line option.



42
43
44
# File 'lib/test/unit/notify.rb', line 42

def enable
  @@enable = true
end

.enable=(enable) ⇒ Object

Deprecated.

Use enable or disable instead.



53
54
55
# File 'lib/test/unit/notify.rb', line 53

def enable=(enable)
  self.default = enable
end

.enabled?Boolean

Return whether test result notification is enabled or not.

Returns:

  • (Boolean)

    return whether test result notification is enabled or not.



59
60
61
62
# File 'lib/test/unit/notify.rb', line 59

def enabled?
  @@enable = Notifier.available? if @@enable.nil?
  @@enable
end