Drop driver getter from database

This commit is contained in:
Brian J. Cardiff 2023-05-29 13:40:58 -03:00
parent 0a08eace7a
commit 33a5b2b78b
3 changed files with 8 additions and 13 deletions

View file

@ -160,8 +160,8 @@ DB.register_driver "bar", BarDriver
describe DB do
it "should be able to register multiple drivers" do
DB.open("foo://host").driver.should be_a(FooDriver)
DB.open("bar://host").driver.should be_a(BarDriver)
DB.open("foo://host").checkout.should be_a(FooDriver::FooConnection)
DB.open("bar://host").checkout.should be_a(BarDriver::BarConnection)
end
it "Foo and Bar drivers should return fake_row" do

View file

@ -9,12 +9,9 @@ describe DB do
DB.driver_class("dummy").should eq(DummyDriver)
end
it "should instantiate driver with connection uri" do
it "should create dummy connection" do
db = DB.open "dummy://localhost:1027"
db.driver.should be_a(DummyDriver)
db.uri.scheme.should eq("dummy")
db.uri.host.should eq("localhost")
db.uri.port.should eq(1027)
db.checkout.should be_a(DummyDriver::DummyConnection)
end
it "should create a connection and close it" do