shard-crystal-db/spec/std/db/driver_spec.cr
Brian J. Cardiff 4dd0312934 prepare/exec a statement
dummy driver that parses the query
initial type support for result_sets
2016-02-25 22:25:54 -03:00

15 lines
402 B
Crystal

require "spec"
require "db"
require "./dummy_driver"
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