123456789_123456789_123456789_123456789_123456789_

Module: Test::Unit::Priority

Relationships & Source Files
Namespace Children
Modules:
Classes:
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/test/unit/priority.rb

Class Attribute Summary

Class Method Summary

Instance Method Summary

Class Attribute Details

.default (rw)

[ GitHub ]

  
# File 'lib/test/unit/priority.rb', line 30

def default
  @@default || :normal
end

.default=(default) (rw)

[ GitHub ]

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

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

.enabled?Boolean (readonly)

[ GitHub ]

  
# File 'lib/test/unit/priority.rb', line 15

def enabled?
  @@enabled
end

Class Method Details

.available_values

[ GitHub ]

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

def available_values
  Checker.available_priorities
end

.disable

[ GitHub ]

  
# File 'lib/test/unit/priority.rb', line 25

def disable
  @@enabled = false
end

.enable

[ GitHub ]

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

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

.included(base)

[ GitHub ]

  
# File 'lib/test/unit/priority.rb', line 5

def included(base)
  base.extend(ClassMethods)

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

Instance Method Details

#priority_setup

[ GitHub ]

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

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

#priority_teardown

[ GitHub ]

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

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