diff options
Diffstat (limited to 'spec/ruby/core/string/downcase_spec.rb')
| -rw-r--r-- | spec/ruby/core/string/downcase_spec.rb | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/spec/ruby/core/string/downcase_spec.rb b/spec/ruby/core/string/downcase_spec.rb index 2d260f23f1..4f7f44e5d4 100644 --- a/spec/ruby/core/string/downcase_spec.rb +++ b/spec/ruby/core/string/downcase_spec.rb @@ -24,7 +24,7 @@ describe "String#downcase" do downcased.should == "king" downcased.size.should == 4 downcased.bytesize.should == 4 - downcased.ascii_only?.should be_true + downcased.ascii_only?.should == true end end @@ -48,7 +48,7 @@ describe "String#downcase" do end it "does not allow any other additional option" do - -> { "İ".downcase(:turkic, :ascii) }.should raise_error(ArgumentError) + -> { "İ".downcase(:turkic, :ascii) }.should.raise(ArgumentError) end end @@ -62,7 +62,7 @@ describe "String#downcase" do end it "does not allow any other additional option" do - -> { "İS".downcase(:lithuanian, :ascii) }.should raise_error(ArgumentError) + -> { "İS".downcase(:lithuanian, :ascii) }.should.raise(ArgumentError) end end @@ -74,18 +74,18 @@ describe "String#downcase" do end it "does not allow invalid options" do - -> { "ABC".downcase(:invalid_option) }.should raise_error(ArgumentError) + -> { "ABC".downcase(:invalid_option) }.should.raise(ArgumentError) end it "returns a String instance for subclasses" do - StringSpecs::MyString.new("FOObar").downcase.should be_an_instance_of(String) + StringSpecs::MyString.new("FOObar").downcase.should.instance_of?(String) end end describe "String#downcase!" do it "modifies self in place" do a = "HeLlO" - a.downcase!.should equal(a) + a.downcase!.should.equal?(a) a.should == "hello" end @@ -109,7 +109,7 @@ describe "String#downcase!" do downcased.should == "king" downcased.size.should == 4 downcased.bytesize.should == 4 - downcased.ascii_only?.should be_true + downcased.ascii_only?.should == true end end @@ -141,7 +141,7 @@ describe "String#downcase!" do end it "does not allow any other additional option" do - -> { a = "İ"; a.downcase!(:turkic, :ascii) }.should raise_error(ArgumentError) + -> { a = "İ"; a.downcase!(:turkic, :ascii) }.should.raise(ArgumentError) end end @@ -159,7 +159,7 @@ describe "String#downcase!" do end it "does not allow any other additional option" do - -> { a = "İS"; a.downcase!(:lithuanian, :ascii) }.should raise_error(ArgumentError) + -> { a = "İS"; a.downcase!(:lithuanian, :ascii) }.should.raise(ArgumentError) end end @@ -175,7 +175,7 @@ describe "String#downcase!" do end it "does not allow invalid options" do - -> { a = "ABC"; a.downcase!(:invalid_option) }.should raise_error(ArgumentError) + -> { a = "ABC"; a.downcase!(:invalid_option) }.should.raise(ArgumentError) end it "returns nil if no modifications were made" do @@ -185,11 +185,11 @@ describe "String#downcase!" do end it "raises a FrozenError when self is frozen" do - -> { "HeLlo".freeze.downcase! }.should raise_error(FrozenError) - -> { "hello".freeze.downcase! }.should raise_error(FrozenError) + -> { "HeLlo".freeze.downcase! }.should.raise(FrozenError) + -> { "hello".freeze.downcase! }.should.raise(FrozenError) end it "sets the result String encoding to the source String encoding" do - "ABC".downcase.encoding.should equal(Encoding::UTF_8) + "ABC".downcase.encoding.should.equal?(Encoding::UTF_8) end end |
