refactor and add specs for query without blocks

This commit is contained in:
Brian J. Cardiff 2016-04-14 18:50:44 -03:00
parent 3464a1d1cc
commit d4b2046a65
2 changed files with 15 additions and 23 deletions

View file

@ -167,6 +167,13 @@ describe DB do
db.query("query", Slice(UInt8).new(4)) { }
db.query("query", 1, "string", FooValue.new(5)) { }
db.query "query", [1, "string", FooValue.new(5)] { }
db.query("query").close
db.query("query", 1).close
db.query("query", 1, "string").close
db.query("query", Slice(UInt8).new(4)).close
db.query("query", 1, "string", FooValue.new(5)).close
db.query("query", [1, "string", FooValue.new(5)]).close
end
DB.open("bar://host") do |db|
@ -177,6 +184,13 @@ describe DB do
db.query("query", Slice(UInt8).new(4)) { }
db.query("query", 1, "string", BarValue.new(5)) { }
db.query "query", [1, "string", FooValue.new(5)] { }
db.query("query").close
db.query("query", 1).close
db.query("query", 1, "string").close
db.query("query", Slice(UInt8).new(4)).close
db.query("query", 1, "string", BarValue.new(5)).close
db.query("query", [1, "string", BarValue.new(5)]).close
end
end
end