Module: Test::Unit::Priority

Included in:
TestCase
Defined in:
lib/test/unit/priority.rb

Defined Under Namespace

Modules: ClassMethods Classes: Checker

Constant Summary

@@enabled =
false
@@default =
:normal

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Object) available_values



40
41
42
# File 'lib/test/unit/priority.rb', line 40

def available_values
  Checker.available_priorities
end

+ (Object) default



32
33
34
# File 'lib/test/unit/priority.rb', line 32

def default
  @@default || :normal
end

+ (Object) default=(default)



36
37
38
# File 'lib/test/unit/priority.rb', line 36

def default=(default)
  @@default = default
end

+ (Object) disable



27
28
29
# File 'lib/test/unit/priority.rb', line 27

def disable
  @@enabled = false
end

+ (Object) enable



21
22
23
24
25
# File 'lib/test/unit/priority.rb', line 21

def enable
  require "fileutils"
  require "tmpdir"
  @@enabled = true
end

+ (Boolean) enabled?

Returns:

  • (Boolean)


17
18
19
# File 'lib/test/unit/priority.rb', line 17

def enabled?
  @@enabled
end

Instance Method Details

- (Object) priority_setup



171
172
173
174
# File 'lib/test/unit/priority.rb', line 171

def priority_setup
  return unless Priority.enabled?
  Checker.new(self).setup
end

- (Object) priority_teardown



176
177
178
179
# File 'lib/test/unit/priority.rb', line 176

def priority_teardown
  return unless Priority.enabled?
  Checker.new(self).teardown
end