aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/test_unit
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/test_unit')
-rw-r--r--railties/lib/rails/test_unit/minitest_plugin.rb3
-rw-r--r--railties/lib/rails/test_unit/runner.rb2
2 files changed, 2 insertions, 3 deletions
diff --git a/railties/lib/rails/test_unit/minitest_plugin.rb b/railties/lib/rails/test_unit/minitest_plugin.rb
index 149aad372c..70ce9d3360 100644
--- a/railties/lib/rails/test_unit/minitest_plugin.rb
+++ b/railties/lib/rails/test_unit/minitest_plugin.rb
@@ -7,9 +7,8 @@ def Minitest.plugin_rails_init(options)
options[:filter] = method
end
- if ENV["BACKTRACE"].nil? && !($rails_test_runner && $rails_test_runner.show_backtrace?)
+ if !($rails_test_runner && $rails_test_runner.show_backtrace?)
Minitest.backtrace_filter = Rails.backtrace_cleaner
end
end
Minitest.extensions << 'rails'
-
diff --git a/railties/lib/rails/test_unit/runner.rb b/railties/lib/rails/test_unit/runner.rb
index 5a1b98d534..aec4707947 100644
--- a/railties/lib/rails/test_unit/runner.rb
+++ b/railties/lib/rails/test_unit/runner.rb
@@ -7,7 +7,7 @@ module Rails
class TestRunner
class Options
def self.parse(args)
- options = { backtrace: false, name: nil, environment: "test" }
+ options = { backtrace: !ENV["BACKTRACE"].nil?, name: nil, environment: "test" }
opt_parser = ::OptionParser.new do |opts|
opts.banner = "Usage: bin/rails test [options] [file or directory]"