Updates for crystal 0.24.0

This commit is contained in:
Brian J. Cardiff 2017-12-22 09:12:07 -03:00
parent 790b587e3f
commit ac083f430a
6 changed files with 16 additions and 10 deletions

View file

@ -87,15 +87,21 @@ describe "DB.mapping" do
end
it "should fail to initialize a simple mapping if types do not match" do
expect_raises { from_dummy("b,a", SimpleMapping) }
expect_raises ArgumentError do
from_dummy("b,a", SimpleMapping)
end
end
it "should fail to initialize a simple mapping if there is a missing column" do
expect_raises { from_dummy("1", SimpleMapping) }
expect_raises DB::MappingException do
from_dummy("1", SimpleMapping)
end
end
it "should fail to initialize a simple mapping if there is an unexpected column" do
expect_raises { from_dummy("1,a,b", SimpleMapping) }
expect_raises DB::MappingException do
from_dummy("1,a,b", SimpleMapping)
end
end
it "should initialize a non-strict mapping if there is an unexpected column" do