Skip to content

Commit

Permalink
Merge pull request #334 from timsutton/fix-osxpkg-spec-skip
Browse files Browse the repository at this point in the history
OS X spec tests, properly skip on non-OS X
  • Loading branch information
jordansissel committed Jan 8, 2013
2 parents a247d8a + 6682b7d commit e66f9f1
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions spec/fpm/package/osxpkg_spec.rb
Expand Up @@ -2,13 +2,13 @@
require "fpm" # local
require "fpm/package/osxpkg" # local

describe FPM::Package::OSXpkg do

if %x{uname -s}.chomp != "Darwin"
Cabin::Channel.get("rspec").warn("Skipping OS X tests because " \
"this system is #{%x{uname -s}.chomp}, Darwin required")
end
platform_is_darwin = (%x{uname -s}.chomp == "Darwin")
if !platform_is_darwin
Cabin::Channel.get("rspec").warn("Skipping OS X pkg tests requiring 'pkgbuild', " \
"which requires a Darwin platform.")
end

describe FPM::Package::OSXpkg do
describe "#identifier" do
it "should be of the form reverse.domain.pkgname" do
subject.name = "name"
Expand All @@ -34,7 +34,7 @@
end
end

describe "#output" do
describe "#output", :if => platform_is_darwin do
before :all do
# output a package, use it as the input, set the subject to that input
# package. This helps ensure that we can write and read packages
Expand Down Expand Up @@ -69,5 +69,4 @@
end
end # package attributes
end # #output

end # describe FPM::Package:OSXpkg

0 comments on commit e66f9f1

Please sign in to comment.