Module: Test::Unit::Notify

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

Defined Under Namespace

Classes: Notifier

Constant Summary

VERSION =

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

"1.0.1"
@@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.



51
52
53
# File 'lib/test/unit/notify.rb', line 51

def disable
  @@enable = false
end

+ (Object) enable

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



45
46
47
# File 'lib/test/unit/notify.rb', line 45

def enable
  @@enable = true
end

+ (Object) enable=(enable)

Deprecated.

Use enable or disable instead.



56
57
58
# File 'lib/test/unit/notify.rb', line 56

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.



62
63
64
65
# File 'lib/test/unit/notify.rb', line 62

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