Update to crystal 0.10.0

This commit is contained in:
Brian J. Cardiff 2016-01-28 21:05:59 -03:00
parent 45fee52b98
commit ee0bc75e3a

View file

@ -46,7 +46,7 @@ describe Database do
it "executes with bind blob" do it "executes with bind blob" do
ary = UInt8[0x53, 0x51, 0x4C, 0x69, 0x74, 0x65] ary = UInt8[0x53, 0x51, 0x4C, 0x69, 0x74, 0x65]
rows = with_db(&.execute(%(select cast(? as BLOB)), Slice.new(ary.buffer, ary.size))) rows = with_db(&.execute(%(select cast(? as BLOB)), Slice.new(ary.to_unsafe, ary.size)))
row = rows[0] row = rows[0]
cell = row[0] as Slice(UInt8) cell = row[0] as Slice(UInt8)
cell.to_a.should eq(ary) cell.to_a.should eq(ary)
@ -105,7 +105,6 @@ describe Database do
with_db(&.get_first_row(%(select 1))).should eq([1]) with_db(&.get_first_row(%(select 1))).should eq([1])
end end
it "gets first value" do it "gets first value" do
with_db(&.get_first_value(%(select 1))).should eq(1) with_db(&.get_first_value(%(select 1))).should eq(1)
end end
@ -124,7 +123,7 @@ describe Database do
rs.next rs.next
break break
end end
rescue e : SQLite3::Exception rescue e : SQLite3::Exception
fail("Expected no exception, but got \"#{e.message}\"") fail("Expected no exception, but got \"#{e.message}\"")
end end