Skip to content

Commit 0dbbe9b

Browse files
committed
Tighten up tests for rb_str_export_to_enc.
1 parent ff1ba50 commit 0dbbe9b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spec/ruby/optional/capi/string_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,12 +882,13 @@ def inspect
882882
source = "A simple string".encode(Encoding::US_ASCII)
883883
result = @s.rb_str_export_to_enc(source, Encoding::UTF_8)
884884
result.should == source.encode(Encoding::UTF_8)
885+
result.encoding.should == Encoding::UTF_8
885886
end
886887

887888
it "returns the source string if it can not be converted" do
888889
source = ["00ff"].pack("H*");
889890
result = @s.rb_str_export_to_enc(source, Encoding::UTF_8)
890-
result.should == source
891+
result.should.equal?(source)
891892
end
892893

893894
it "does not alter the source string if it can not be converted" do

0 commit comments

Comments
 (0)