Skip to content

Commit

Permalink
Skip python specs if easy_install isn't available
Browse files Browse the repository at this point in the history
  • Loading branch information
jordansissel committed May 12, 2012
1 parent 1d184e9 commit ce3df22
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions spec/fpm/package/python_spec.rb
Expand Up @@ -2,13 +2,16 @@
require "fpm" # local
require "fpm/package/python" # local

have_python = program_in_path?("python")
if !have_python
Cabin::Channel.get("rspec") \
.warn("Skipping Python#input tests because 'python' isn't in your PATH")
def python_usable?
return program_in_path?("python") && program_in_path?("easy_install")
end

describe FPM::Package::Python, :if => have_python do
if !python_usable?
Cabin::Channel.get("rspec").warn("Skipping Python#input tests because " \
"'python' and/or 'easy_install' isn't in your PATH")
end

describe FPM::Package::Python, :if => python_usable? do
let (:example_dir) do
File.expand_path("../../fixtures/python/", File.dirname(__FILE__))
end
Expand Down

0 comments on commit ce3df22

Please sign in to comment.