diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/application/rake/dbs_test.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/railties/test/application/rake/dbs_test.rb b/railties/test/application/rake/dbs_test.rb index c727e0e46d..267469b6f5 100644 --- a/railties/test/application/rake/dbs_test.rb +++ b/railties/test/application/rake/dbs_test.rb @@ -176,8 +176,10 @@ module ApplicationTests test 'db:setup loads schema and seeds database' do begin - @old_env = ENV["RAILS_ENV"] + @old_rails_env = ENV["RAILS_ENV"] + @old_rack_env = ENV["RACK_ENV"] ENV.delete "RAILS_ENV" + ENV.delete "RACK_ENV" app_file 'db/schema.rb', <<-RUBY ActiveRecord::Schema.define(version: "1") do @@ -196,7 +198,8 @@ module ApplicationTests assert_equal "development.sqlite3", File.basename(database_path.strip) end ensure - ENV["RAILS_ENV"] = @old_env + ENV["RAILS_ENV"] = @old_rails_env + ENV["RACK_ENV"] = @old_rack_env end end end |