diff options
author | 2010-08-03 20:49:13 +0200 | |
---|---|---|
committer | 2010-08-05 19:58:05 +0300 | |
commit | aa2a806578ef106684823881e6c04786daa1782b (patch) | |
tree | 155b1b2c8d82ad4694e68c7d1bd5a005d1a4a1d9 /config | |
parent | Change navigation tab Suggestion Questions to Suggest Questions (diff) | |
download | recruiting-webapp-aa2a806578ef106684823881e6c04786daa1782b.tar.gz recruiting-webapp-aa2a806578ef106684823881e6c04786daa1782b.tar.bz2 recruiting-webapp-aa2a806578ef106684823881e6c04786daa1782b.zip |
Run tests in prepared environment, don't load config.
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/custom_config.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/config/initializers/custom_config.rb b/config/initializers/custom_config.rb index a20dc7b..0cb01b4 100644 --- a/config/initializers/custom_config.rb +++ b/config/initializers/custom_config.rb @@ -1,5 +1,10 @@ begin - APP_CONFIG = YAML.load_file("#{RAILS_ROOT}/config/config.yml")[RAILS_ENV] + if Rails.env.test? || Rails.env.cucumber? + # Tests must be run in known environment + APP_CONFIG = { 'developer_data' => { 'check' => false } } + else + APP_CONFIG = YAML.load_file("#{RAILS_ROOT}/config/config.yml")[RAILS_ENV] + end rescue APP_CONFIG = Hash.new end |