aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2012-05-06 21:36:59 -0700
committerPiotr Sarnacki <drogus@gmail.com>2012-05-06 21:36:59 -0700
commit055857841ad53fcc1ccd20756f085690bd221646 (patch)
treef77abaf6f228b6f394936a95c2689bd942722ada /railties/test
parent3ac93d662933ee032227da0bcce57807c7d57889 (diff)
downloadrails-055857841ad53fcc1ccd20756f085690bd221646.tar.gz
rails-055857841ad53fcc1ccd20756f085690bd221646.tar.bz2
rails-055857841ad53fcc1ccd20756f085690bd221646.zip
Ensure that Rails.env is equal to "test" by default when running tests.
Rails.env when running tests on localhost differs from travis ci which makes it harder to write tests that check env related things.
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/abstract_unit.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/railties/test/abstract_unit.rb b/railties/test/abstract_unit.rb
index 29ebdc6511..dfcf5aa27d 100644
--- a/railties/test/abstract_unit.rb
+++ b/railties/test/abstract_unit.rb
@@ -1,3 +1,5 @@
+ENV["RAILS_ENV"] ||= "test"
+
require File.expand_path("../../../load_paths", __FILE__)
require 'stringio'