Skip to content

Commit

Permalink
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions spec/ruby/core/string/unicode_normalize_spec.rb
Original file line number Diff line number Diff line change
@@ -23,7 +23,9 @@
end

it "raises an Encoding::CompatibilityError if the string is not in an unicode encoding" do
lambda { @angstrom.force_encoding("ISO-8859-1").unicode_normalize }.should raise_error(Encoding::CompatibilityError)
lambda do
@angstrom.force_encoding("ISO-8859-1").unicode_normalize
end.should raise_error(Encoding::CompatibilityError)
end

it "raises an ArgumentError if the specified form is invalid" do
@@ -44,7 +46,9 @@
end

it "raises an Encoding::CompatibilityError if the string is not in an unicode encoding" do
lambda { @ohm.force_encoding("ISO-8859-1").unicode_normalize! }.should raise_error(Encoding::CompatibilityError)
lambda do
@ohm.force_encoding("ISO-8859-1").unicode_normalize!
end.should raise_error(Encoding::CompatibilityError)
end

it "raises an ArgumentError if the specified form is invalid" do
@@ -88,7 +92,9 @@
end

it "raises an Encoding::CompatibilityError if the string is not in an unicode encoding" do
lambda { @nfc_normalized_str.force_encoding("ISO-8859-1").unicode_normalized? }.should raise_error(Encoding::CompatibilityError)
lambda do
@nfc_normalized_str.force_encoding("ISO-8859-1").unicode_normalized?
end.should raise_error(Encoding::CompatibilityError)
end

it "raises an ArgumentError if the specified form is invalid" do

0 comments on commit 649739c

Please sign in to comment.