]> git.openstreetmap.org Git - rails.git/commitdiff
Always run tests using example.application.yml
authorJohn Firebaugh <john.firebaugh@gmail.com>
Wed, 31 Jul 2013 23:19:01 +0000 (16:19 -0700)
committerTom Hughes <tom@compton.nu>
Thu, 1 Aug 2013 16:26:48 +0000 (17:26 +0100)
This fixes an Oauth integration test failure when a
custom application.yml is present.

config/preinitializer.rb

index 1cc3f62c780a37bf64e6920bf1ed1bbf144ee9ca..377e6bad4a6a13ac33095926085eccefccc925fb 100644 (file)
@@ -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_(.*)$/)