diff options
Diffstat (limited to 'spec/ruby/core/string/encoding_spec.rb')
| -rw-r--r-- | spec/ruby/core/string/encoding_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/ruby/core/string/encoding_spec.rb b/spec/ruby/core/string/encoding_spec.rb index f6e8fd3470..aa0e4765ed 100644 --- a/spec/ruby/core/string/encoding_spec.rb +++ b/spec/ruby/core/string/encoding_spec.rb @@ -4,7 +4,7 @@ require_relative 'fixtures/iso-8859-9-encoding' describe "String#encoding" do it "returns an Encoding object" do - String.new.encoding.should be_an_instance_of(Encoding) + String.new.encoding.should.instance_of?(Encoding) end it "is equal to the source encoding by default" do @@ -70,13 +70,13 @@ describe "String#encoding for Strings with \\u escapes" do it "returns US-ASCII if self is US-ASCII only" do s = "\u{40}" - s.ascii_only?.should be_true + s.ascii_only?.should == true s.encoding.should == Encoding::US_ASCII end it "returns UTF-8 if self isn't US-ASCII only" do s = "\u{4076}\u{619}" - s.ascii_only?.should be_false + s.ascii_only?.should == false s.encoding.should == Encoding::UTF_8 end @@ -122,7 +122,7 @@ describe "String#encoding for Strings with \\x escapes" do it "returns US-ASCII if self is US-ASCII only" do s = "\x61" - s.ascii_only?.should be_true + s.ascii_only?.should == true s.encoding.should == Encoding::US_ASCII end @@ -131,7 +131,7 @@ describe "String#encoding for Strings with \\x escapes" do str = " " str.encoding.should == Encoding::US_ASCII str += [0xDF].pack('C') - str.ascii_only?.should be_false + str.ascii_only?.should == false str.encoding.should == Encoding::BINARY end @@ -140,7 +140,7 @@ describe "String#encoding for Strings with \\x escapes" do it "returns the source encoding when an escape creates a byte with the 8th bit set if the source encoding isn't US-ASCII" do fixture = StringSpecs::ISO88599Encoding.new fixture.source_encoding.should == Encoding::ISO8859_9 - fixture.x_escape.ascii_only?.should be_false + fixture.x_escape.ascii_only?.should == false fixture.x_escape.encoding.should == Encoding::ISO8859_9 end |
