Module: Test::Unit::Priority

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

Defined Under Namespace

Modules: ClassMethods Classes: Checker

Constant Summary collapse

@@enabled =
false
@@default =
:normal

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.available_valuesObject



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

def available_values
  Checker.available_priorities
end

.defaultObject



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

def default
  @@default || :normal
end

.default=(default) ⇒ Object



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

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

.disableObject



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

def disable
  @@enabled = false
end

.enableObject



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

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

.enabled?Boolean

Returns:

  • (Boolean)


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

def enabled?
  @@enabled
end

Instance Method Details

#priority_setupObject



181
182
183
184
# File 'lib/test/unit/priority.rb', line 181

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

#priority_teardownObject



186
187
188
189
# File 'lib/test/unit/priority.rb', line 186

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