1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eregon 2019-02-21 15:38:59 +00:00
parent b8e389a0f3
commit da7976235f
75 changed files with 940 additions and 258 deletions

View file

@ -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