Fix ActiveRecord::ConnectionNotEstablished error in tests