Module: Test::Unit::Notify — test-unit-notify - test-unit

Module: Test::Unit::Notify

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

Defined Under Namespace

Classes: Notifier

Constant Summary

VERSION =

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

"1.0.4"
@@enable =
nil

Class Method Summary (collapse)

Class Method Details

+ (Object) disable

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

+ (Object) enable

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

+ (Object) enable=(enable)

Deprecated.

Use enable or disable instead.



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

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

+ (Boolean) enabled?

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