aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominyk Tiller2016-08-10 21:36:07 +0100
committerDominyk Tiller2016-08-13 03:33:33 +0100
commit13dcdb3098d6c1089db937d5c122cf06a0631ac4 (patch)
treecc34f9584b52642170ce223a63b791af3c59ca47
parente02ad2242ab98f9ea7418ef51741480e3bfa4ed1 (diff)
downloadbrew-13dcdb3098d6c1089db937d5c122cf06a0631ac4.tar.bz2
test_gpg2_requirement: add satisfied test
-rw-r--r--Library/Homebrew/test/test_gpg2_requirement.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_gpg2_requirement.rb b/Library/Homebrew/test/test_gpg2_requirement.rb
new file mode 100644
index 000000000..fa7fc9ea4
--- /dev/null
+++ b/Library/Homebrew/test/test_gpg2_requirement.rb
@@ -0,0 +1,24 @@
+require "testing_env"
+require "requirements/gpg2_requirement"
+require "fileutils"
+
+class GPG2RequirementTests < Homebrew::TestCase
+ def setup
+ @dir = Pathname.new(mktmpdir)
+ (@dir/"bin/gpg").write <<-EOS.undent
+ #!/bin/bash
+ echo 2.0.30
+ EOS
+ FileUtils.chmod 0755, @dir/"bin/gpg"
+ end
+
+ def teardown
+ FileUtils.rm_rf @dir
+ end
+
+ def test_satisfied
+ with_environment("PATH" => @dir/"bin") do
+ assert_predicate GPG2Requirement.new, :satisfied?
+ end
+ end
+end