diff options
author | Kir Shatrov <shatrov@me.com> | 2017-02-27 08:22:56 -0600 |
---|---|---|
committer | Kir Shatrov <shatrov@me.com> | 2017-02-27 08:23:02 -0600 |
commit | 4846eeee0f422c885e13325364f8e860a0c1595e (patch) | |
tree | eb09a023778fdf3c3af9a94d8d7743b39e8f4f20 /activerecord/test/support | |
parent | 558336ee2afad116077df07b5b963077ac5f5021 (diff) | |
download | rails-4846eeee0f422c885e13325364f8e860a0c1595e.tar.gz rails-4846eeee0f422c885e13325364f8e860a0c1595e.tar.bz2 rails-4846eeee0f422c885e13325364f8e860a0c1595e.zip |
Handle non-existing $ARCONN
Diffstat (limited to 'activerecord/test/support')
-rw-r--r-- | activerecord/test/support/connection.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/test/support/connection.rb b/activerecord/test/support/connection.rb index bc5af36a28..1a609e13c3 100644 --- a/activerecord/test/support/connection.rb +++ b/activerecord/test/support/connection.rb @@ -10,7 +10,10 @@ module ARTest end def self.connection_config - config["connections"][connection_name] + config.fetch("connections").fetch(connection_name) do + puts "Connection #{connection_name.inspect} not found. Available connections: #{config['connections'].keys.join(', ')}" + exit 1 + end end def self.connect |