diff options
author | Yves Senn <yves.senn@gmail.com> | 2015-01-30 16:19:37 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2015-03-18 09:52:19 +0100 |
commit | 6ccbeb458a5698db6242d7bd326ef9d9bd23c7b6 (patch) | |
tree | d241391c788ffc74868aa4c37ee91f6b47f0da2c /railties/lib/rails/test_unit | |
parent | ac5ead59ae488e937c6a87662e14fba98b8a1e7e (diff) | |
download | rails-6ccbeb458a5698db6242d7bd326ef9d9bd23c7b6.tar.gz rails-6ccbeb458a5698db6242d7bd326ef9d9bd23c7b6.tar.bz2 rails-6ccbeb458a5698db6242d7bd326ef9d9bd23c7b6.zip |
move `ENV["BACKTRACE"]` support into the TestRunner.
Diffstat (limited to 'railties/lib/rails/test_unit')
-rw-r--r-- | railties/lib/rails/test_unit/minitest_plugin.rb | 3 | ||||
-rw-r--r-- | railties/lib/rails/test_unit/runner.rb | 2 |
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]" |