module Test::Unit::Priority

Public Class Methods

available_values() click to toggle source
# File test-unit-3.3.7/lib/test/unit/priority.rb, line 40
def available_values
  Checker.available_priorities
end
default() click to toggle source
# File test-unit-3.3.7/lib/test/unit/priority.rb, line 32
def default
  @@default || :normal
end
default=(default) click to toggle source
# File test-unit-3.3.7/lib/test/unit/priority.rb, line 36
def default=(default)
  @@default = default
end
disable() click to toggle source
# File test-unit-3.3.7/lib/test/unit/priority.rb, line 27
def disable
  @@enabled = false
end
enable() click to toggle source
# File test-unit-3.3.7/lib/test/unit/priority.rb, line 21
def enable
  require "fileutils"
  require "tmpdir"
  @@enabled = true
end
enabled?() click to toggle source
# File test-unit-3.3.7/lib/test/unit/priority.rb, line 17
def enabled?
  @@enabled
end
included(base) click to toggle source
# File test-unit-3.3.7/lib/test/unit/priority.rb, line 7
def included(base)
  base.extend(ClassMethods)

  base.class_eval do
    setup :priority_setup, :before => :prepend
    teardown :priority_teardown, :after => :append
  end
end

Public Instance Methods

priority_setup() click to toggle source
# File test-unit-3.3.7/lib/test/unit/priority.rb, line 185
def priority_setup
  return unless Priority.enabled?
  Checker.new(self).setup
end
priority_teardown() click to toggle source
# File test-unit-3.3.7/lib/test/unit/priority.rb, line 190
def priority_teardown
  return unless Priority.enabled?
  Checker.new(self).teardown
end