summaryrefslogtreecommitdiff
path: root/spec/ruby/library/stringio/print_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/stringio/print_spec.rb')
-rw-r--r--spec/ruby/library/stringio/print_spec.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/library/stringio/print_spec.rb b/spec/ruby/library/stringio/print_spec.rb
index 00c33367dc..48728e5f14 100644
--- a/spec/ruby/library/stringio/print_spec.rb
+++ b/spec/ruby/library/stringio/print_spec.rb
@@ -29,7 +29,7 @@ describe "StringIO#print" do
end
it "returns nil" do
- @io.print(1, 2, 3).should be_nil
+ @io.print(1, 2, 3).should == nil
end
it "pads self with \\000 when the current position is after the end" do
@@ -52,10 +52,10 @@ describe "StringIO#print" do
it "updates the current position" do
@io.print(1, 2, 3)
- @io.pos.should eql(3)
+ @io.pos.should.eql?(3)
@io.print(1, 2, 3)
- @io.pos.should eql(6)
+ @io.pos.should.eql?(6)
end
it "correctly updates the current position when honoring the output record separator global" do
@@ -64,7 +64,7 @@ describe "StringIO#print" do
begin
@io.print(5, 6, 7, 8)
- @io.pos.should eql(5)
+ @io.pos.should.eql?(5)
ensure
suppress_warning {$\ = old_rs}
end
@@ -86,17 +86,17 @@ describe "StringIO#print when in append mode" do
it "correctly updates self's position" do
@io.print(", testing")
- @io.pos.should eql(16)
+ @io.pos.should.eql?(16)
end
end
describe "StringIO#print when self is not writable" do
it "raises an IOError" do
io = StringIO.new(+"test", "r")
- -> { io.print("test") }.should raise_error(IOError)
+ -> { io.print("test") }.should.raise(IOError)
io = StringIO.new(+"test")
io.close_write
- -> { io.print("test") }.should raise_error(IOError)
+ -> { io.print("test") }.should.raise(IOError)
end
end