aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2016-09-25 21:11:58 +0200
committerGitHub <noreply@github.com>2016-09-25 21:11:58 +0200
commit6b8e6c4fbde27920b25b5567546ea9c4f4ad538f (patch)
tree6072a8c4a251c42ef206ab03085886eae2c0fc3f /railties/lib
parent8c4c61598d8ffc63cf5d4a67b37628c924741394 (diff)
parent9a80f52541ed2c93ebef02909ecab3aaf9127150 (diff)
downloadrails-6b8e6c4fbde27920b25b5567546ea9c4f4ad538f.tar.gz
rails-6b8e6c4fbde27920b25b5567546ea9c4f4ad538f.tar.bz2
rails-6b8e6c4fbde27920b25b5567546ea9c4f4ad538f.zip
Merge pull request #26579 from y-yagi/remove_unnecessary_rails_env_setting
remove unnecessary `RAILS_ENV` setting
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/generators/rails/app/templates/test/test_helper.rb1
-rw-r--r--railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb3
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__)]