discourse/lib/tasks/turbo.rake
Martin Brennan 4ab1f76499
DEV: Fix bin/turbo_rspec runtime recording (#20407)
This commit 57caf08e13 broke
`bin/turbo_rspec` timing recording via `TurboTests::Runner`,
because we changed to using all `spec/*` folders except
`spec/system` as default for the runner, rather than
the old `['spec']` array, which is what `TurboTests::Runner`
was relying on to determine whether to record test run
time with `ParallelTests::RSpec::RuntimeLogger`.

Instead, we can just pass a new `use_runtime_info` boolean to the
runner class and use it when running against the default set of
spec files using `bin/turbo_rspec` and the turbo rspec rake task.
2023-02-23 07:47:11 +10:00

12 lines
266 B
Ruby

# frozen_string_literal: true
task "turbo:spec" => :test do |t|
require "./lib/turbo_tests"
TurboTests::Runner.run(
formatters: [{ name: "progress", outputs: ["-"] }],
files: TurboTests::Runner.default_spec_folders,
use_runtime_info: true,
)
end