Sha256: 878d812ccaac7514aeea0dd08c599b9c86e1ecf743fd6895a3dc5667385f2e58

Contents?: true

Size: 431 Bytes

Versions: 6

Compression:

Stored size: 431 Bytes

Contents

module TestRunner
  extend self

  def run_in_subprocess
    pid = fork do run end
    _, status = Process.wait2 pid
    status
  end

  def run
    Bundler.require :test
    load 'test/test_helper.rb'
    tests = Dir["test/**/*_test.rb"]
    tests.select! do |test| test == ENV['TEST'] end if ENV['TEST']
    tests.each &method(:load)
    argv = (ENV['TESTOPTS'] || '').split %r{[[:space:]]+}
    exit Minitest.run argv
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ntl-orchestra-0.9.5 test/lib/test_runner.rb
ntl-orchestra-0.9.4 test/lib/test_runner.rb
ntl-orchestra-0.9.3 test/lib/test_runner.rb
ntl-orchestra-0.9.2 test/lib/test_runner.rb
ntl-orchestra-0.9.1 test/lib/test_runner.rb
ntl-orchestra-0.9.0 test/lib/test_runner.rb