diff options
Diffstat (limited to 'spec/ruby/core/array/shared/inspect.rb')
| -rw-r--r-- | spec/ruby/core/array/shared/inspect.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/core/array/shared/inspect.rb b/spec/ruby/core/array/shared/inspect.rb index a2b43d4959..7197cd7f26 100644 --- a/spec/ruby/core/array/shared/inspect.rb +++ b/spec/ruby/core/array/shared/inspect.rb @@ -2,7 +2,7 @@ require_relative '../fixtures/encoded_strings' describe :array_inspect, shared: true do it "returns a string" do - [1, 2, 3].send(@method).should be_an_instance_of(String) + [1, 2, 3].send(@method).should.instance_of?(String) end it "returns '[]' for an empty Array" do @@ -19,7 +19,7 @@ describe :array_inspect, shared: true do end it "does not call #to_s on a String returned from #inspect" do - str = "abc" + str = +"abc" str.should_not_receive(:to_s) [str].send(@method).should == '["abc"]' @@ -55,7 +55,7 @@ describe :array_inspect, shared: true do obj.should_receive(:inspect).and_return(obj) obj.should_receive(:to_s).and_raise(Exception) - -> { [obj].send(@method) }.should raise_error(Exception) + -> { [obj].send(@method) }.should.raise(Exception) end it "represents a recursive element with '[...]'" do @@ -98,8 +98,8 @@ describe :array_inspect, shared: true do end it "does not raise if inspected result is not default external encoding" do - utf_16be = mock("utf_16be") - utf_16be.should_receive(:inspect).and_return(%<"utf_16be \u3042">.encode!(Encoding::UTF_16BE)) + utf_16be = mock(+"utf_16be") + utf_16be.should_receive(:inspect).and_return(%<"utf_16be \u3042">.encode(Encoding::UTF_16BE)) [utf_16be].send(@method).should == '["utf_16be \u3042"]' end |
