summaryrefslogtreecommitdiff
path: root/spec/ruby/core/io/each_codepoint_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/io/each_codepoint_spec.rb')
-rw-r--r--spec/ruby/core/io/each_codepoint_spec.rb16
1 files changed, 7 insertions, 9 deletions
diff --git a/spec/ruby/core/io/each_codepoint_spec.rb b/spec/ruby/core/io/each_codepoint_spec.rb
index eb16e004fa..26cc87fc0e 100644
--- a/spec/ruby/core/io/each_codepoint_spec.rb
+++ b/spec/ruby/core/io/each_codepoint_spec.rb
@@ -1,10 +1,10 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-require File.expand_path('../shared/codepoints', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'fixtures/classes'
+require_relative 'shared/codepoints'
# See redmine #1667
describe "IO#each_codepoint" do
- it_behaves_like(:io_codepoints, :codepoints)
+ it_behaves_like :io_codepoints, :each_codepoint
end
describe "IO#each_codepoint" do
@@ -24,7 +24,7 @@ describe "IO#each_codepoint" do
end
it "returns self" do
- @io.each_codepoint { |l| l }.should equal(@io)
+ @io.each_codepoint { |l| l }.should.equal?(@io)
end
end
@@ -37,9 +37,7 @@ describe "IO#each_codepoint" do
@io.close if @io
end
- ruby_version_is "2.3" do # earlier versions stay blocked
- it "raises an exception at incomplete character before EOF when conversion takes place" do
- lambda { @io.each_codepoint {} }.should raise_error(ArgumentError)
- end
+ it "raises an exception at incomplete character before EOF when conversion takes place" do
+ -> { @io.each_codepoint {} }.should.raise(ArgumentError)
end
end