summaryrefslogtreecommitdiff
path: root/spec/ruby/library/stringio/read_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/stringio/read_spec.rb')
-rw-r--r--spec/ruby/library/stringio/read_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/library/stringio/read_spec.rb b/spec/ruby/library/stringio/read_spec.rb
index 2b9c6e10b2..9a2086a682 100644
--- a/spec/ruby/library/stringio/read_spec.rb
+++ b/spec/ruby/library/stringio/read_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
require "stringio"
-require File.expand_path('../shared/read', __FILE__)
+require_relative 'shared/read'
describe "StringIO#read when passed length, buffer" do
it_behaves_like :stringio_read, :read
@@ -39,7 +39,7 @@ describe "StringIO#read when passed [length]" do
it "returns nil when self's position is at the end" do
@io.pos = 7
- @io.read(10).should be_nil
+ @io.read(10).should == nil
end
it "returns an empty String when length is 0" do
@@ -53,10 +53,10 @@ describe "StringIO#read when passed length and a buffer" do
end
it "reads [length] characters into the buffer" do
- buf = "foo"
+ buf = +"foo"
result = @io.read(10, buf)
buf.should == "abcdefghij"
- result.should equal(buf)
+ result.should.equal?(buf)
end
end