mirror of
https://gitea.invidious.io/iv-org/shard-crystal-db.git
synced 2024-08-15 00:53:32 +00:00
Drop driver getter from database
This commit is contained in:
parent
0a08eace7a
commit
33a5b2b78b
3 changed files with 8 additions and 13 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue