diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2016-09-22 17:25:09 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2016-09-22 17:39:14 +0900 |
commit | 9a80f52541ed2c93ebef02909ecab3aaf9127150 (patch) | |
tree | 23aea98687021dfcfd72320fb0dadf96633a4857 | |
parent | 19966242163611e61d45ee4033f28aa6f967906a (diff) | |
download | rails-9a80f52541ed2c93ebef02909ecab3aaf9127150.tar.gz rails-9a80f52541ed2c93ebef02909ecab3aaf9127150.tar.bz2 rails-9a80f52541ed2c93ebef02909ecab3aaf9127150.zip |
remove unnecessary `RAILS_ENV` setting
`RAILS_ENV` is always set in the initialization process of test runner.
https://github.com/rails/rails/blob/9fa07095a35be2d8cb5adcc992b988e73a6d9719/railties/lib/rails/test_unit/minitest_plugin.rb#L74
Therefore, it is not necessary to set in `test_helper`.
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/test/test_helper.rb | 1 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb | 3 |
2 files changed, 0 insertions, 4 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb b/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb index 87b8fe3516..2f92168eef 100644 --- a/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb +++ b/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb @@ -1,4 +1,3 @@ -ENV['RAILS_ENV'] ||= 'test' require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help' diff --git a/railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb b/railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb index a5eebcb19f..e84e403018 100644 --- a/railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb +++ b/railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb @@ -1,6 +1,3 @@ -# Configure Rails Environment -ENV["RAILS_ENV"] = "test" - require File.expand_path("../../<%= options[:dummy_path] -%>/config/environment.rb", __FILE__) <% unless options[:skip_active_record] -%> ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../<%= options[:dummy_path] -%>/db/migrate", __FILE__)] |