class TestUnitPriority

Public Instance Methods

assert_need_to_run(test_name, expected, delta) click to toggle source
# File test-unit-3.3.4/test/test-priority.rb, line 95
def assert_need_to_run(test_name, expected, delta)
  test = TestCase.new(test_name)
  n = 1000
  n_need_to_run = 0
  n.times do |i|
    n_need_to_run += 1 if Test::Unit::Priority::Checker.need_to_run?(test)
  end
  assert_in_delta(expected, n_need_to_run.to_f / n, delta)
end
assert_priority(priority, expected, delta) click to toggle source
# File test-unit-3.3.4/test/test-priority.rb, line 90
def assert_priority(priority, expected, delta)
  assert_need_to_run("test_#{priority}", expected, delta)
  assert_need_to_run("test_#{priority}_inherited", expected, delta)
end
test_priority_high() click to toggle source
# File test-unit-3.3.4/test/test-priority.rb, line 74
def test_priority_high
  assert_priority("high", 0.70, 0.1)
end
test_priority_important() click to toggle source
# File test-unit-3.3.4/test/test-priority.rb, line 70
def test_priority_important
  assert_priority("important", 0.9, 0.09)
end
test_priority_low() click to toggle source
# File test-unit-3.3.4/test/test-priority.rb, line 82
def test_priority_low
  assert_priority("low", 0.25, 0.1)
end
test_priority_must() click to toggle source
# File test-unit-3.3.4/test/test-priority.rb, line 66
def test_priority_must
  assert_priority("must", 1.0, 0.0001)
end
test_priority_never() click to toggle source
# File test-unit-3.3.4/test/test-priority.rb, line 86
def test_priority_never
  assert_priority("never", 0.0, 0.0001)
end
test_priority_normal() click to toggle source
# File test-unit-3.3.4/test/test-priority.rb, line 78
def test_priority_normal
  assert_priority("normal", 0.5, 0.1)
end