aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/test/test_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activestorage/test/test_helper.rb')
-rw-r--r--activestorage/test/test_helper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activestorage/test/test_helper.rb b/activestorage/test/test_helper.rb
index 7826c1aeba..5b6d3b64c2 100644
--- a/activestorage/test/test_helper.rb
+++ b/activestorage/test/test_helper.rb
@@ -14,7 +14,9 @@ require "active_storage"
require "yaml"
SERVICE_CONFIGURATIONS = begin
- YAML.load(ERB.new(Pathname.new(File.expand_path("../service/configurations.yml", __FILE__)).read).result).deep_symbolize_keys
+ erb = ERB.new(Pathname.new(File.expand_path("../service/configurations.yml", __FILE__)).read)
+ configuration = YAML.load(erb.result) || {}
+ configuration.deep_symbolize_keys
rescue Errno::ENOENT
puts "Missing service configuration file in test/service/configurations.yml"
{}