aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2017-04-29 22:54:27 +0200
committerTeddy Wing2017-04-29 22:54:27 +0200
commit56a002d2681431b34be36cf7247dc41a313601d9 (patch)
tree0fa8a00f7b253f1c1d6554873238e48b89c8ac19
parent575141e4efc770a4207eb5d905819d4017731f65 (diff)
downloaddbshell-rails-56a002d2681431b34be36cf7247dc41a313601d9.tar.bz2
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.
-rw-r--r--lib/dbshell/client/database.rb4
-rw-r--r--spec/dbshell/client/database_spec.rb2
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