Sha256: 97cc1550c43a7225337dc4676f54b460152373aca46ddc6fcc51a7833d2d75ff
Contents?: true
Size: 589 Bytes
Versions: 5
Compression:
Stored size: 589 Bytes
Contents
require 'pathname' describe "Pathname#root?" do it "returns true for root directories" do Pathname.new('/').root?.should == true end it "returns false for empty string" do Pathname.new('').root?.should == false end it "returns false for a top level directory" do Pathname.new('/usr').root?.should == false end it "returns false for a top level with .. appended directory" do Pathname.new('/usr/..').root?.should == false end it "returns false for a directory below top level" do Pathname.new('/usr/local/bin/').root?.should == false end end
Version data entries
5 entries across 5 versions & 1 rubygems