From 56a002d2681431b34be36cf7247dc41a313601d9 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 29 Apr 2017 22:54:27 +0200 Subject: Rename `InvalidDatabaseAdapter` to `UnsupportedDatabaseAdapter` Tried this out with MySQL, and got this error since I haven't integrated it yet. It struck me that "Invalid" doesn't make any sense. Really it's something that is possible to do but that our gem doesn't support, so we should be clearer about that fact. --- lib/dbshell/client/database.rb | 4 ++-- spec/dbshell/client/database_spec.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/dbshell/client/database.rb b/lib/dbshell/client/database.rb index 08fd8fe..86cbfef 100644 --- a/lib/dbshell/client/database.rb +++ b/lib/dbshell/client/database.rb @@ -11,7 +11,7 @@ module DBShell when 'postgresql' DBShell::Client::Postgres else - raise InvalidDatabaseAdapter + raise UnsupportedDatabaseAdapter end end @@ -23,6 +23,6 @@ module DBShell end - class InvalidDatabaseAdapter < StandardError; end + class UnsupportedDatabaseAdapter < StandardError; end end end diff --git a/spec/dbshell/client/database_spec.rb b/spec/dbshell/client/database_spec.rb index 96f9d2c..d553871 100644 --- a/spec/dbshell/client/database_spec.rb +++ b/spec/dbshell/client/database_spec.rb @@ -20,7 +20,7 @@ describe DBShell::Client::Database do DBShell::Client::Database.handler({ 'adapter' => 'sybil_system' }) - end.must_raise(DBShell::Client::InvalidDatabaseAdapter) + end.must_raise(DBShell::Client::UnsupportedDatabaseAdapter) end end end -- cgit v1.2.3