shard-crystal-db/spec/result_set_spec.cr
2016-02-25 22:37:10 -03:00

18 lines
336 B
Crystal

require "./spec_helper"
describe DB::ResultSet do
it "should enumerate records using each" do
nums = [] of Int32
with_dummy do |db|
db.query "3,4 1,2" do |rs|
rs.each do
nums << rs.read(Int32)
nums << rs.read(Int32)
end
end
end
nums.should eq([3, 4, 1, 2])
end
end