diff options
author | Teddy Wing | 2017-04-29 22:21:01 +0200 |
---|---|---|
committer | Teddy Wing | 2017-04-29 22:21:01 +0200 |
commit | 46b019abd520870ab159b60c03c45675f64dd88a (patch) | |
tree | 7204226a8129cf40a4723c9def1a4e01c6e663fb /spec/dbshell/client/database_spec.rb | |
parent | 6f4057392857313355769de7fea293b5e50f0779 (diff) | |
download | dbshell-rails-46b019abd520870ab159b60c03c45675f64dd88a.tar.bz2 |
Rename database client classes
Update our class names to reflect the new file structure introduced in
b700c1bef89a67a64f1040fb6bb03c0320eefe91.
Use the
module DBShell
module Client
end
end
syntax intead of `DBShell::Client` so that we don't have to define the
`Client` module in a separate file and require it. Otherwise we'd get an
error:
lib/dbshell/client/sqlite3.rb:1:in `<top (required)>': uninitialized constant DBShell::Client (NameError)
Diffstat (limited to 'spec/dbshell/client/database_spec.rb')
-rw-r--r-- | spec/dbshell/client/database_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/dbshell/client/database_spec.rb b/spec/dbshell/client/database_spec.rb index e08d810..5fe5597 100644 --- a/spec/dbshell/client/database_spec.rb +++ b/spec/dbshell/client/database_spec.rb @@ -1,23 +1,23 @@ require 'minitest/autorun' require 'dbshell/client/database' -describe DBShell::DatabaseClient do +describe DBShell::Client::Database do describe ".handler" do it "handles SQLite3" do - DBShell::DatabaseClient.handler({ + DBShell::Client::Database.handler({ 'adapter' => 'sqlite3' - }).must_equal(DBShell::Sqlite3Client) + }).must_equal(DBShell::Client::Sqlite3) end it "handles Postgres" do - DBShell::DatabaseClient.handler({ + DBShell::Client::Database.handler({ 'adapter' => 'postgresql' - }).must_equal(DBShell::PostgresClient) + }).must_equal(DBShell::Client::Postgres) end it "raises an error if no suitable adapter is found" do proc do - DBShell::DatabaseClient.handler({ + DBShell::Client::Database.handler({ 'adapter' => 'sybil_system' }) end.must_raise(DBShell::InvalidDatabaseAdapter) |