lib/test_queue/runner/minitest5.rb in test-queue-0.5.0 vs lib/test_queue/runner/minitest5.rb in test-queue-0.6.0

- old
+ new

@@ -1,6 +1,6 @@ -require 'test_queue/runner' +require_relative '../runner' module MiniTest def self.__run reporter, options suites = Runnable.runnables suites.map { |suite| suite.run reporter, options } @@ -54,9 +54,16 @@ module TestQueue class Runner class MiniTest < Runner def initialize + options = Minitest.process_args ARGV + + if Minitest.respond_to?(:seed) + Minitest.seed = options[:seed] + srand Minitest.seed + end + if ::MiniTest::Test.runnables.any? { |r| r.runnable_methods.any? } fail "Do not `require` test files. Pass them via ARGV instead and they will be required as needed." end super(TestFramework::MiniTest.new) end