1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

check if @rake_patterns is defined

This removes the following warning.
```
railties/lib/rails/test_unit/minitest_plugin.rb:45: warning: instance variable @rake_patterns not initialize
```
This commit is contained in:
yuuji.yaginuma 2015-09-27 22:31:46 +09:00
parent 587e2857a9
commit cc7867da4a

View file

@ -42,7 +42,8 @@ module Minitest
ENV["RAILS_ENV"] = options[:environment] || "test"
unless run_with_autorun
::Rails::TestRequirer.require_files @rake_patterns || options[:patterns]
patterns = defined?(@rake_patterns) ? @rake_patterns : options[:patterns]
::Rails::TestRequirer.require_files(patterns)
end
unless options[:full_backtrace] || ENV["BACKTRACE"]