aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application/rake/dbs_test.rb
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2014-09-03 21:59:38 +0200
committerYves Senn <yves.senn@gmail.com>2014-09-04 07:54:30 +0200
commit316962d0922992fbe756521bd7c94a751aa1253e (patch)
treea1cbf5902101a0293f2ab46b820ea77ddec6906f /railties/test/application/rake/dbs_test.rb
parent98318750126b2d1cf6569e7ebfce5d2aee469dcd (diff)
downloadrails-316962d0922992fbe756521bd7c94a751aa1253e.tar.gz
rails-316962d0922992fbe756521bd7c94a751aa1253e.tar.bz2
rails-316962d0922992fbe756521bd7c94a751aa1253e.zip
build fix, we have to reset the RACK_ENV as well.
This is a follow-up to ded17a4 to get the build passing on Travis. As Travis has `ENV["RACK_ENV"]` set to `test` we need to reset that as well.
Diffstat (limited to 'railties/test/application/rake/dbs_test.rb')
-rw-r--r--railties/test/application/rake/dbs_test.rb7
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