diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2012-05-06 21:36:59 -0700 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2012-05-06 21:36:59 -0700 |
commit | 055857841ad53fcc1ccd20756f085690bd221646 (patch) | |
tree | f77abaf6f228b6f394936a95c2689bd942722ada /railties/test | |
parent | 3ac93d662933ee032227da0bcce57807c7d57889 (diff) | |
download | rails-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.rb | 2 |
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' |