Skip to content

Commit

Permalink
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions spec/std/named_tuple_spec.cr
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ describe "NamedTuple" do
NamedTuple(foo: Int32, bar: Int32).from({:foo => 1, :baz => 2})
end

expect_raises(TypeCastError, /cast to Int32 failed/) do
expect_raises(TypeCastError, /cast from String to Int32 failed/) do
NamedTuple(foo: Int32, bar: Int32).from({:foo => 1, :bar => "foo"})
end
end
@@ -44,7 +44,7 @@ describe "NamedTuple" do
{foo: Int32, bar: Int32}.from({:foo => 1, :baz => 2})
end

expect_raises(TypeCastError, /cast to Int32 failed/) do
expect_raises(TypeCastError, /cast from String to Int32 failed/) do
{foo: Int32, bar: Int32}.from({:foo => 1, :bar => "foo"})
end
end
4 changes: 2 additions & 2 deletions spec/std/tuple_spec.cr
Original file line number Diff line number Diff line change
@@ -155,7 +155,7 @@ describe "Tuple" do
Tuple(Int32).from([1, 2])
end

expect_raises(TypeCastError, /cast to Int32 failed/) do
expect_raises(TypeCastError, /cast from String to Int32 failed/) do
Tuple(Int32, String).from(["foo", 1])
end
end
@@ -169,7 +169,7 @@ describe "Tuple" do
{Int32}.from([1, 2])
end

expect_raises(TypeCastError, /cast to Int32 failed/) do
expect_raises(TypeCastError, /cast from String to Int32 failed/) do
{Int32, String}.from(["foo", 1])
end
end

0 comments on commit 477c5d4

Please sign in to comment.