Skip to content

Commit b8ff96b

Browse files
herwinweregon
authored andcommitted
Add error message validation in spec for Encoding.find with unknown encoding
1 parent f861448 commit b8ff96b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/encoding/find_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def to_str; @encoding_name; end
5050
end
5151

5252
it "raises an ArgumentError if the given encoding does not exist" do
53-
-> { Encoding.find('dh2dh278d') }.should raise_error(ArgumentError)
53+
-> { Encoding.find('dh2dh278d') }.should raise_error(ArgumentError, 'unknown encoding name - dh2dh278d')
5454
end
5555

5656
# Not sure how to do a better test, since locale depends on weird platform-specific stuff

0 commit comments

Comments
 (0)