diff options
author | Xavier Noria <fxn@hashref.com> | 2013-02-20 01:55:53 -0800 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2013-02-20 01:55:53 -0800 |
commit | e5c26ee1ed4a39f5df3793e2b4a59e9a2614a008 (patch) | |
tree | 2a99eab6af1b734ac8e092225c3ec072943e854d /activerecord/test/cases/connection_specification | |
parent | c3f1b1d3cdb837a24d66b80deda39cfe23856724 (diff) | |
parent | 0a6b61a5f534c07406f1ec2de11b4a53ce81151d (diff) | |
download | rails-e5c26ee1ed4a39f5df3793e2b4a59e9a2614a008.tar.gz rails-e5c26ee1ed4a39f5df3793e2b4a59e9a2614a008.tar.bz2 rails-e5c26ee1ed4a39f5df3793e2b4a59e9a2614a008.zip |
Merge pull request #8060 from senny/7313_descriptive_error_message_for_missing_adapter
descriptive error message when AR adapter was not found. Closes #7313
Diffstat (limited to 'activerecord/test/cases/connection_specification')
-rw-r--r-- | activerecord/test/cases/connection_specification/resolver_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/test/cases/connection_specification/resolver_test.rb b/activerecord/test/cases/connection_specification/resolver_test.rb index f0a2cdca1a..fb21ab4f50 100644 --- a/activerecord/test/cases/connection_specification/resolver_test.rb +++ b/activerecord/test/cases/connection_specification/resolver_test.rb @@ -70,6 +70,15 @@ module ActiveRecord spec = resolve "abstract://foo:#{encoded_password}@localhost/bar" assert_equal password, spec[:password] end + + def test_descriptive_error_message_when_adapter_is_missing + error = assert_raise(LoadError) do + resolve(adapter: 'non-existing') + end + + assert_match "Could not load 'active_record/connection_adapters/non-existing_adapter'", error.message + end + end end end |