Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

OS X spec tests, properly skip on non-OS X #334

Merged
merged 2 commits into from

2 participants

@timsutton

Had been warning that the tests would be skipped but wasn't actually doing it where required (for output tests that require the pkgbuild binary). They should be properly skipped now on any non OS X kernel.

@jordansissel jordansissel merged commit b4fd092 into jordansissel:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 8 deletions.
  1. +7 −8 spec/fpm/package/osxpkg_spec.rb
View
15 spec/fpm/package/osxpkg_spec.rb
@@ -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"
@@ -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
@@ -69,5 +69,4 @@
end
end # package attributes
end # #output
-
end # describe FPM::Package:OSXpkg
Something went wrong with that request. Please try again.