diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2015-09-27 22:31:46 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2015-09-28 13:30:32 +0900 |
commit | cc7867da4a670600892b3d0f3d903aa7d556d3d3 (patch) | |
tree | 0d2a36cc49c165dc8a4b05fbcea83349f36f4e7a /railties/lib/rails/test_unit | |
parent | 587e2857a9327df9a0e5998a14fa95e52c3dad49 (diff) | |
download | rails-cc7867da4a670600892b3d0f3d903aa7d556d3d3.tar.gz rails-cc7867da4a670600892b3d0f3d903aa7d556d3d3.tar.bz2 rails-cc7867da4a670600892b3d0f3d903aa7d556d3d3.zip |
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
```
Diffstat (limited to 'railties/lib/rails/test_unit')
-rw-r--r-- | railties/lib/rails/test_unit/minitest_plugin.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/railties/lib/rails/test_unit/minitest_plugin.rb b/railties/lib/rails/test_unit/minitest_plugin.rb index dacab08ec3..1923433c4a 100644 --- a/railties/lib/rails/test_unit/minitest_plugin.rb +++ b/railties/lib/rails/test_unit/minitest_plugin.rb @@ -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"] |