module TestUnitTestUtil

Private Instance Methods

_run_test(test_case, name) { |test| ... } click to toggle source
# File test-unit-3.3.4/test/testunit-test-util.rb, line 21
def _run_test(test_case, name)
  result = Test::Unit::TestResult.new
  test = test_case.new(name)
  yield(test) if block_given?
  test.run(result) {}
  result
end
assert_fault_messages(expected, faults) click to toggle source
# File test-unit-3.3.4/test/testunit-test-util.rb, line 17
def assert_fault_messages(expected, faults)
  assert_equal(expected, faults.collect {|fault| fault.message})
end
fixture_file_path(file_name) click to toggle source
# File test-unit-3.3.4/test/testunit-test-util.rb, line 29
def fixture_file_path(file_name)
  base_dir = File.dirname(__FILE__)
  File.join(base_dir, "fixtures", file_name)
end
jruby?() click to toggle source
# File test-unit-3.3.4/test/testunit-test-util.rb, line 5
def jruby?
  RUBY_PLATFORM == "java"
end
jruby_only_test() click to toggle source
# File test-unit-3.3.4/test/testunit-test-util.rb, line 9
def jruby_only_test
  if jruby?
    require "java"
  else
    omit("test for JRuby")
  end
end