shard-crystal-db/spec/std/db/driver_spec.cr

16 lines
402 B
Crystal
Raw Normal View History

2016-01-28 22:41:12 +00:00
require "spec"
require "db"
require "./dummy_driver"
2016-01-28 22:41:12 +00:00
describe DB::Driver do
it "should get driver class by name" do
DB.driver_class("dummy").should eq(DummyDriver)
end
it "should instantiate driver with options" do
driver = DB.driver "dummy", {"host": "localhost", "port": "1027"}
driver.options["host"].should eq("localhost")
driver.options["port"].should eq("1027")
end
end