1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #37180 from seejohnrun/fix-error-hash-access

Fix error message for AdapterNotFound in spec
This commit is contained in:
Eileen M. Uchitelle 2019-09-12 10:21:42 -04:00 committed by GitHub
commit ff7a88d456
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,6 +26,14 @@ module ActiveRecord
assert_match "Could not load the 'ridiculous' Active Record adapter. Ensure that the adapter is spelled correctly in config/database.yml and that you've added the necessary adapter gem to your Gemfile.", error.message
end
def test_error_if_no_adapter_method
error = assert_raises(AdapterNotFound) do
spec "abstract://foo?encoding=utf8"
end
assert_match "database configuration specifies nonexistent abstract adapter", error.message
end
# The abstract adapter is used simply to bypass the bit of code that
# checks that the adapter file can be required in.