Skip to content

Commit e74dc16

Browse files
authored
Merge pull request rails#51718 from rails/mt-rails
Don't mess with Minitest unless RAILS_ENV is set
2 parents 4123240 + aa7957e commit e74dc16

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

railties/lib/minitest/rails_plugin.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ def self.plugin_rails_options(opts, options)
109109
# Owes great inspiration to test runner trailblazers like RSpec,
110110
# minitest-reporters, maxitest, and others.
111111
def self.plugin_rails_init(options)
112+
# Don't mess with Minitest unless RAILS_ENV is set
113+
return unless ENV["RAILS_ENV"]
114+
112115
unless options[:full_backtrace]
113116
# Plugin can run without Rails loaded, check before filtering.
114117
if ::Rails.respond_to?(:backtrace_cleaner)

0 commit comments

Comments
 (0)