Permalink
Browse files

Fix osxpkg spec tests that should have been skipped on non-Darwin pla…

…tforms.
  • Loading branch information...
1 parent 7ce7264 commit 67547bca0aa7596fc6ce7e8db4b6407dbf922a8d @timsutton timsutton committed Jan 8, 2013
Showing with 5 additions and 6 deletions.
  1. +5 −6 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 " \
+platform_is_darwin = (%x{uname -s}.chomp == "Darwin")
+if !platform_is_darwin
+ Cabin::Channel.get("rspec").warn("Skipping OS X pkg tests because " \
"this system is #{%x{uname -s}.chomp}, Darwin required")
- end
+end
+describe FPM::Package::OSXpkg, :if => platform_is_darwin do
describe "#identifier" do
it "should be of the form reverse.domain.pkgname" do
subject.name = "name"
@@ -69,5 +69,4 @@
end
end # package attributes
end # #output
-
end # describe FPM::Package:OSXpkg

0 comments on commit 67547bc

Please sign in to comment.