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:
commit
ff7a88d456
1 changed files with 8 additions and 0 deletions
|
@ -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.
|
||||
|
||||
|
|
Loading…
Reference in a new issue