Sha256: 8185a820fc730da47d90abd7a8f925e5baf878eada25d59c820be16bb960cb49

Contents?: true

Size: 355 Bytes

Versions: 5

Compression:

Stored size: 355 Bytes

Contents

require 'pathname'

describe "Pathname#parent" do

  it "has parent of root as root" do
    Pathname.new('/').parent.to_s.should == '/'
  end

  it "has parent of /usr/ as root" do
    Pathname.new('/usr/').parent.to_s.should == '/'
  end

  it "has parent of /usr/local as root" do
    Pathname.new('/usr/local').parent.to_s.should == '/usr'
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rubysl-pathname-2.3 spec/parent_spec.rb
rubysl-pathname-2.2 spec/parent_spec.rb
rubysl-pathname-2.1.0 spec/parent_spec.rb
rubysl-pathname-1.0.0 spec/parent_spec.rb
rubysl-pathname-2.0.0 spec/parent_spec.rb