summaryrefslogtreecommitdiff
path: root/spec/ruby/core/symbol/capitalize_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/symbol/capitalize_spec.rb')
-rw-r--r--spec/ruby/core/symbol/capitalize_spec.rb25
1 files changed, 5 insertions, 20 deletions
diff --git a/spec/ruby/core/symbol/capitalize_spec.rb b/spec/ruby/core/symbol/capitalize_spec.rb
index 73850a2a8c..a93d951e6a 100644
--- a/spec/ruby/core/symbol/capitalize_spec.rb
+++ b/spec/ruby/core/symbol/capitalize_spec.rb
@@ -1,9 +1,9 @@
# -*- encoding: utf-8 -*-
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Symbol#capitalize" do
it "returns a Symbol" do
- :glark.capitalize.should be_an_instance_of(Symbol)
+ :glark.capitalize.should.instance_of?(Symbol)
end
it "converts the first character to uppercase if it is ASCII" do
@@ -14,18 +14,9 @@ describe "Symbol#capitalize" do
:"£1.20".capitalize.should == :"£1.20"
end
- ruby_version_is ''...'2.4' do
- it "leaves the first character alone if it is not an alphabetical ASCII character" do
- "\u{00DE}c".to_sym.capitalize.should == :"Þc"
- "\u{00DF}C".to_sym.capitalize.should == :"ßc"
- end
- end
-
- ruby_version_is '2.4' do
- it "capitalizes the first character if it is Unicode" do
- :"äöü".capitalize.should == :"Äöü"
- :"aou".capitalize.should == :"Aou"
- end
+ it "capitalizes the first character if it is Unicode" do
+ :"äöü".capitalize.should == :"Äöü"
+ :"aou".capitalize.should == :"Aou"
end
it "converts subsequent uppercase ASCII characters to their lowercase equivalents" do
@@ -40,12 +31,6 @@ describe "Symbol#capitalize" do
:mIxEd.capitalize.should == :Mixed
end
- ruby_version_is ''...'2.4' do
- it "leaves uppercase Unicode characters as they were" do
- "a\u{00DE}c".to_sym.capitalize.should == :"AÞc"
- end
- end
-
it "leaves lowercase Unicode characters (except in first position) as they were" do
"a\u{00DF}C".to_sym.capitalize.should == :"Aßc"
end