diff options
author | Victor Costan <costan@gmail.com> | 2015-07-01 00:56:14 -0400 |
---|---|---|
committer | Victor Costan <costan@gmail.com> | 2015-07-01 00:56:14 -0400 |
commit | e334ec4fe6baf40cf695c334762f8f2eea8a06ed (patch) | |
tree | af5b3cb4100a36380be0c09845048c6aabdd98c2 | |
parent | bc6ac8609cf79f28047c0928b9433e00e6ea1f09 (diff) | |
download | rails-e334ec4fe6baf40cf695c334762f8f2eea8a06ed.tar.gz rails-e334ec4fe6baf40cf695c334762f8f2eea8a06ed.tar.bz2 rails-e334ec4fe6baf40cf695c334762f8f2eea8a06ed.zip |
Avoid crashing when minitest-rails is loaded.
The improvments to the test runner's integration with minitest in commit
b6fc8e25a10cc4abdd03018798b180270d6c5d7f add methods to the Minitest
module that refer to the Rails module. Unfortunately, when the
minitest-rails gem is loaded, the reference is incorrectly resolved to
the Minitest::Rails module.
-rw-r--r-- | railties/lib/rails/test_unit/minitest_plugin.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/rails/test_unit/minitest_plugin.rb b/railties/lib/rails/test_unit/minitest_plugin.rb index 421f032d81..ab71298509 100644 --- a/railties/lib/rails/test_unit/minitest_plugin.rb +++ b/railties/lib/rails/test_unit/minitest_plugin.rb @@ -34,14 +34,14 @@ module Minitest ENV["RAILS_ENV"] = options[:environment] || "test" - Rails::TestRequirer.require_files options[:patterns] unless run_with_autorun + ::Rails::TestRequirer.require_files options[:patterns] unless run_with_autorun unless options[:full_backtrace] || ENV["BACKTRACE"] # Plugin can run without Rails loaded, check before filtering. - Minitest.backtrace_filter = Rails.backtrace_cleaner if Rails.respond_to?(:backtrace_cleaner) + Minitest.backtrace_filter = ::Rails.backtrace_cleaner if ::Rails.respond_to?(:backtrace_cleaner) end - self.reporter << Rails::TestUnitReporter.new(options[:io], options) + self.reporter << ::Rails::TestUnitReporter.new(options[:io], options) end mattr_accessor(:run_with_autorun) { false } |