bernd / fpm-cookery

A tool for building software packages with fpm.
Other
460 stars 88 forks source link

Test fails on newer Mac OS #55

Closed sepulworld closed 10 years ago

sepulworld commented 10 years ago

The pwd tests fail on Mac when running rake test. I will work on a change to take this into account. On Mac (atleast anything above Mac OS 9.x as far as I know) /tmp is hardlinked to /private/tmp

describe "Path" do
  describe ".pwd" do
    it "returns the current dir" do
      Dir.chdir('/tmp') do
        FPM::Cookery::Path.pwd.to_s.must_equal '/tmp'
      end
    end

    it "adds the given path to the current dir" do
      Dir.chdir('/tmp') do
        FPM::Cookery::Path.pwd('foo').to_s.must_equal '/tmp/foo'
      end
    end
  end

Here is me testing this from irb

1.9.3-p429 :003 > Dir.chdir('/tmp')
 => 0
1.9.3-p429 :004 > Dir.pwd
 => "/private/tmp"
sepulworld commented 10 years ago

I opened pull request #56 with the proposed test change to take into account Mac OS's /private/tmp/