From: John Firebaugh Date: Wed, 31 Jul 2013 23:19:01 +0000 (-0700) Subject: Always run tests using example.application.yml X-Git-Tag: live~4855 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/c4edac9fd8ca44c3a0c8a9dbee611f872fffe14b?ds=sidebyside Always run tests using example.application.yml This fixes an Oauth integration test failure when a custom application.yml is present. --- diff --git a/config/preinitializer.rb b/config/preinitializer.rb index 1cc3f62c7..377e6bad4 100644 --- a/config/preinitializer.rb +++ b/config/preinitializer.rb @@ -1,7 +1,7 @@ require 'yaml' -config = YAML.load_file(File.expand_path("../application.yml", __FILE__)) env = ENV['RAILS_ENV'] || 'development' +config = YAML.load_file(File.expand_path(env == "test" ? "../example.application.yml" : "../application.yml", __FILE__)) ENV.each do |key,value| if key.match(/^OSM_(.*)$/)