diff options
Diffstat (limited to 'spec/ruby/core/encoding/invalid_byte_sequence_error/readagain_bytes_spec.rb')
-rw-r--r-- | spec/ruby/core/encoding/invalid_byte_sequence_error/readagain_bytes_spec.rb | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/spec/ruby/core/encoding/invalid_byte_sequence_error/readagain_bytes_spec.rb b/spec/ruby/core/encoding/invalid_byte_sequence_error/readagain_bytes_spec.rb index 4270a0647a..6f0ff524f5 100644 --- a/spec/ruby/core/encoding/invalid_byte_sequence_error/readagain_bytes_spec.rb +++ b/spec/ruby/core/encoding/invalid_byte_sequence_error/readagain_bytes_spec.rb @@ -1,32 +1,30 @@ # -*- encoding: binary -*- require_relative '../fixtures/classes' -with_feature :encoding do - describe "Encoding::InvalidByteSequenceError#readagain_bytes" do - before :each do - @exception, @errinfo = EncodingSpecs::InvalidByteSequenceError.exception - @exception2, @errinfo2 = EncodingSpecs::InvalidByteSequenceErrorIndirect.exception - end +describe "Encoding::InvalidByteSequenceError#readagain_bytes" do + before :each do + @exception, @errinfo = EncodingSpecs::InvalidByteSequenceError.exception + @exception2, @errinfo2 = EncodingSpecs::InvalidByteSequenceErrorIndirect.exception + end - it "returns a String" do - @exception.readagain_bytes.should be_an_instance_of(String) - @exception2.readagain_bytes.should be_an_instance_of(String) - end + it "returns a String" do + @exception.readagain_bytes.should be_an_instance_of(String) + @exception2.readagain_bytes.should be_an_instance_of(String) + end - it "returns the bytes to be read again" do - @exception.readagain_bytes.size.should == 1 - @exception.readagain_bytes.should == "a".force_encoding('binary') - @exception.readagain_bytes.should == @errinfo[-1] + it "returns the bytes to be read again" do + @exception.readagain_bytes.size.should == 1 + @exception.readagain_bytes.should == "a".force_encoding('binary') + @exception.readagain_bytes.should == @errinfo[-1] - @exception2.readagain_bytes.size.should == 1 - @exception2.readagain_bytes.should == "\xFF".force_encoding('binary') - @exception2.readagain_bytes.should == @errinfo2[-1] - end + @exception2.readagain_bytes.size.should == 1 + @exception2.readagain_bytes.should == "\xFF".force_encoding('binary') + @exception2.readagain_bytes.should == @errinfo2[-1] + end - it "uses ASCII-8BIT as the encoding" do - @exception.readagain_bytes.encoding.should == Encoding::ASCII_8BIT + it "uses ASCII-8BIT as the encoding" do + @exception.readagain_bytes.encoding.should == Encoding::ASCII_8BIT - @exception2.readagain_bytes.encoding.should == Encoding::ASCII_8BIT - end + @exception2.readagain_bytes.encoding.should == Encoding::ASCII_8BIT end end |