Skip to content

A platform for community discussion. Free, open, simple.

FIX: Turbo tests exit codes

Daniel Waterworthc3db5925a8f8
diff --git a/bin/turbo_rspec b/bin/turbo_rspec
index e0af6b31e50..035fae706af 100755
--- a/bin/turbo_rspec
+++ b/bin/turbo_rspec
@@ -50,8 +50,15 @@ formatters.each do |formatter|
end
end
-TurboTests::Runner.run(
- formatters: formatters,
- files: ARGV.empty? ? ["spec"] : ARGV,
- verbose: verbose
-)
+success =
+ TurboTests::Runner.run(
+ formatters: formatters,
+ files: ARGV.empty? ? ["spec"] : ARGV,
+ verbose: verbose
+ )
+
+if success
+ exit 0
+else
+ exit 1
+end
diff --git a/lib/turbo_tests/runner.rb b/lib/turbo_tests/runner.rb
index ad9ca2b3688..ce24c6bdf4e 100644
--- a/lib/turbo_tests/runner.rb
+++ b/lib/turbo_tests/runner.rb
@@ -53,6 +53,8 @@ module TurboTests
@reporter.finish
@threads.each(&:join)
+
+ @reporter.failed_examples.empty?
end
protected