diff --git a/.rubocop_gradual.lock b/.rubocop_gradual.lock index 7d421b0..dac37d7 100644 --- a/.rubocop_gradual.lock +++ b/.rubocop_gradual.lock @@ -22,14 +22,14 @@ [50, 5, 269, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4255608859], [71, 5, 614, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 574527918] ], - "lib/turbo_tests/runner.rb:3852406545": [ + "lib/turbo_tests/runner.rb:1197951922": [ [13, 5, 271, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 21989008], [20, 5, 1400, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1925027850], - [245, 11, 10, "ThreadSafety/NewThread: Avoid starting new threads.", 3411682361], - [264, 47, 6, "Style/GlobalStdStream: Use `$stderr` instead of `STDERR`.", 3356712163], - [266, 21, 10, "ThreadSafety/NewThread: Avoid starting new threads.", 3411682361], - [275, 7, 10, "ThreadSafety/NewThread: Avoid starting new threads.", 3411682361], - [335, 9, 6, "Style/GlobalStdStream: Use `$stdout` instead of `STDOUT`.", 3356722952] + [248, 11, 10, "ThreadSafety/NewThread: Avoid starting new threads.", 3411682361], + [267, 47, 6, "Style/GlobalStdStream: Use `$stderr` instead of `STDERR`.", 3356712163], + [269, 21, 10, "ThreadSafety/NewThread: Avoid starting new threads.", 3411682361], + [278, 7, 10, "ThreadSafety/NewThread: Avoid starting new threads.", 3411682361], + [338, 9, 6, "Style/GlobalStdStream: Use `$stdout` instead of `STDOUT`.", 3356722952] ], "spec/cli_spec.rb:3990998076": [ [1, 1, 30, "RSpec/SpecFilePathFormat: Spec path should end with `turbo_tests/cli*_spec.rb`.", 965721356], diff --git a/lib/turbo_tests/runner.rb b/lib/turbo_tests/runner.rb index 1bb7117..49564fb 100644 --- a/lib/turbo_tests/runner.rb +++ b/lib/turbo_tests/runner.rb @@ -189,11 +189,14 @@ def start_subprocess(env, extra_args, tests, process_id, record_runtime:) env["RUBYOPT"] = ["-I#{File.expand_path("..", __dir__)}", ENV["RUBYOPT"]].compact.join(" ") env["RSPEC_SILENCE_FILTER_ANNOUNCEMENTS"] = "1" - command_name = if ENV["BUNDLE_BIN_PATH"] - [ENV["BUNDLE_BIN_PATH"], "exec", "rspec"] - else - "rspec" - end + command_name = + if ENV["RSPEC_EXECUTABLE"] + ENV["RSPEC_EXECUTABLE"].split + elsif ENV["BUNDLE_BIN_PATH"] + [ENV["BUNDLE_BIN_PATH"], "exec", "rspec"] + else + "rspec" + end record_runtime_options = if record_runtime