From da7976235fbc2986925969646071bebe3702e49f Mon Sep 17 00:00:00 2001 From: eregon Date: Thu, 21 Feb 2019 15:38:59 +0000 Subject: Update to ruby/spec@7a16e01 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- spec/ruby/core/file/split_spec.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'spec/ruby/core/file/split_spec.rb') diff --git a/spec/ruby/core/file/split_spec.rb b/spec/ruby/core/file/split_spec.rb index 7a345e8891..2b22b0a08f 100644 --- a/spec/ruby/core/file/split_spec.rb +++ b/spec/ruby/core/file/split_spec.rb @@ -53,8 +53,9 @@ describe "File.split" do end it "coerces the argument with to_str if it is not a String type" do - class C; def to_str; "/rubinius/better/than/ruby"; end; end - File.split(C.new).should == ["/rubinius/better/than", "ruby"] + obj = mock("str") + obj.should_receive(:to_str).and_return("/one/two/three") + File.split(obj).should == ["/one/two", "three"] end it "accepts an object that has a #to_path method" do -- cgit v1.2.3