diff options
Diffstat (limited to 'spec/ruby/core/argf/binmode_spec.rb')
| -rw-r--r-- | spec/ruby/core/argf/binmode_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/core/argf/binmode_spec.rb b/spec/ruby/core/argf/binmode_spec.rb index 62202360e3..5288e3199d 100644 --- a/spec/ruby/core/argf/binmode_spec.rb +++ b/spec/ruby/core/argf/binmode_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "ARGF.binmode" do before :each do @@ -9,7 +9,7 @@ describe "ARGF.binmode" do it "returns self" do argf [@bin_file] do - @argf.binmode.should equal @argf + @argf.binmode.should.equal? @argf end end @@ -22,7 +22,7 @@ describe "ARGF.binmode" do end end - it "puts alls subsequent stream reading through ARGF into binmode" do + it "puts all subsequent streams reading through ARGF into binmode" do argf [@bin_file, @bin_file] do @argf.binmode @argf.gets.should == "test\r\n" @@ -31,13 +31,13 @@ describe "ARGF.binmode" do end end - it "sets the file's encoding to ASCII-8BIT" do + it "sets the file's encoding to BINARY" do argf [@bin_file, @file1] do @argf.binmode - @argf.binmode?.should == true - @argf.gets.encoding.should == Encoding::ASCII_8BIT + @argf.should.binmode? + @argf.gets.encoding.should == Encoding::BINARY @argf.skip - @argf.read.encoding.should == Encoding::ASCII_8BIT + @argf.read.encoding.should == Encoding::BINARY end end end |
