Skip to content

Commit 4846eee

Browse files
committed
Handle non-existing $ARCONN
1 parent 558336e commit 4846eee

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

activerecord/test/support/connection.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ def self.connection_name
1010
end
1111

1212
def self.connection_config
13-
config["connections"][connection_name]
13+
config.fetch("connections").fetch(connection_name) do
14+
puts "Connection #{connection_name.inspect} not found. Available connections: #{config['connections'].keys.join(', ')}"
15+
exit 1
16+
end
1417
end
1518

1619
def self.connect

0 commit comments

Comments
 (0)