summaryrefslogtreecommitdiff
path: root/spec/ruby/library/stringio/shared/codepoints.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/stringio/shared/codepoints.rb')
-rw-r--r--spec/ruby/library/stringio/shared/codepoints.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/ruby/library/stringio/shared/codepoints.rb b/spec/ruby/library/stringio/shared/codepoints.rb
index c8ca03329f..e35a02ccb4 100644
--- a/spec/ruby/library/stringio/shared/codepoints.rb
+++ b/spec/ruby/library/stringio/shared/codepoints.rb
@@ -6,7 +6,7 @@ describe :stringio_codepoints, shared: true do
end
it "returns an Enumerator" do
- @enum.should be_an_instance_of(Enumerator)
+ @enum.should.instance_of?(Enumerator)
end
it "yields each codepoint code in turn" do
@@ -20,15 +20,15 @@ describe :stringio_codepoints, shared: true do
it "raises an error if reading invalid sequence" do
@io.pos = 1 # inside of a multibyte sequence
- lambda { @enum.first }.should raise_error(ArgumentError)
+ -> { @enum.first }.should.raise(ArgumentError)
end
it "raises an IOError if not readable" do
@io.close_read
- lambda { @enum.to_a }.should raise_error(IOError)
+ -> { @enum.to_a }.should.raise(IOError)
- io = StringIO.new("xyz", "w")
- lambda { io.send(@method).to_a }.should raise_error(IOError)
+ io = StringIO.new(+"xyz", "w")
+ -> { io.send(@method).to_a }.should.raise(IOError)
end
@@ -39,7 +39,7 @@ describe :stringio_codepoints, shared: true do
end
it "returns self" do
- @io.send(@method) {|l| l }.should equal(@io)
+ @io.send(@method) {|l| l }.should.equal?(@io)
end
end