summaryrefslogtreecommitdiff
path: root/spec/ruby/library/stringio/ungetc_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/stringio/ungetc_spec.rb')
-rw-r--r--spec/ruby/library/stringio/ungetc_spec.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/library/stringio/ungetc_spec.rb b/spec/ruby/library/stringio/ungetc_spec.rb
index bceafa79ff..8753ac9666 100644
--- a/spec/ruby/library/stringio/ungetc_spec.rb
+++ b/spec/ruby/library/stringio/ungetc_spec.rb
@@ -14,13 +14,13 @@ describe "StringIO#ungetc when passed [char]" do
it "returns nil" do
@io.pos = 1
- @io.ungetc(?A).should be_nil
+ @io.ungetc(?A).should == nil
end
it "decreases the current position by one" do
@io.pos = 2
@io.ungetc(?A)
- @io.pos.should eql(1)
+ @io.pos.should.eql?(1)
end
it "pads with \\000 when the current position is after the end" do
@@ -39,7 +39,7 @@ describe "StringIO#ungetc when passed [char]" do
end
it "raises a TypeError when the passed length can't be converted to an Integer or String" do
- -> { @io.ungetc(Object.new) }.should raise_error(TypeError)
+ -> { @io.ungetc(Object.new) }.should.raise(TypeError)
end
end
@@ -47,12 +47,12 @@ describe "StringIO#ungetc when self is not readable" do
it "raises an IOError" do
io = StringIO.new(+"test", "w")
io.pos = 1
- -> { io.ungetc(?A) }.should raise_error(IOError)
+ -> { io.ungetc(?A) }.should.raise(IOError)
io = StringIO.new(+"test")
io.pos = 1
io.close_read
- -> { io.ungetc(?A) }.should raise_error(IOError)
+ -> { io.ungetc(?A) }.should.raise(IOError)
end
end
@@ -62,11 +62,11 @@ end
# it "raises an IOError" do
# io = StringIO.new(+"test", "r")
# io.pos = 1
-# lambda { io.ungetc(?A) }.should raise_error(IOError)
+# lambda { io.ungetc(?A) }.should.raise(IOError)
#
# io = StringIO.new(+"test")
# io.pos = 1
# io.close_write
-# lambda { io.ungetc(?A) }.should raise_error(IOError)
+# lambda { io.ungetc(?A) }.should.raise(IOError)
# end
# end