Sha256: 0de3836a6b7f12f92092cc30493a1f6f3d8fb22e235db9ca6ccb34abc778268b

Contents?: true

Size: 640 Bytes

Versions: 60

Compression:

Stored size: 640 Bytes

Contents

require "tempfile"

module TestUnitTestUtil
  private
  def jruby?
    RUBY_PLATFORM == "java"
  end

  def jruby_only_test
    if jruby?
      require "java"
    else
      omit("test for JRuby")
    end
  end

  def assert_fault_messages(expected, faults)
    assert_equal(expected, faults.collect {|fault| fault.message})
  end

  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

  def fixture_file_path(file_name)
    base_dir = File.dirname(__FILE__)
    File.join(base_dir, "fixtures", file_name)
  end
end

Version data entries

60 entries across 36 versions & 5 rubygems

Version Path
win32-api-1.10.1 vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/testunit-test-util.rb
win32-api-1.10.1 vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/testunit-test-util.rb
win32-api-1.10.1 vendor/bundle/ruby/3.0.0/gems/test-unit-3.4.1/test/testunit-test-util.rb
win32-api-1.10.1 vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/testunit-test-util.rb
test-unit-3.4.1 test/testunit-test-util.rb
win32-api-1.10.0 vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/testunit-test-util.rb
win32-api-1.10.0 vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/testunit-test-util.rb
win32-api-1.10.0 vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/testunit-test-util.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.7/test/testunit-test-util.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/test-unit-3.3.8/test/testunit-test-util.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/test-unit-3.3.7/test/testunit-test-util.rb
tdiary-5.1.5 vendor/bundle/ruby/2.7.0/gems/test-unit-3.4.0/test/testunit-test-util.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/test-unit-3.4.0/test/testunit-test-util.rb
test-unit-3.4.0 test/testunit-test-util.rb
test-unit-3.3.9 test/testunit-test-util.rb
test-unit-3.3.8 test/testunit-test-util.rb
tdiary-5.1.4 vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.7/test/testunit-test-util.rb
test-unit-3.3.7 test/testunit-test-util.rb
win32-api-1.9.2 vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/testunit-test-util.rb
win32-api-1.9.2 vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/testunit-test-util.rb