diff options
| author | Dominyk Tiller | 2016-08-10 21:36:07 +0100 |
|---|---|---|
| committer | Dominyk Tiller | 2016-08-13 03:33:33 +0100 |
| commit | 13dcdb3098d6c1089db937d5c122cf06a0631ac4 (patch) | |
| tree | cc34f9584b52642170ce223a63b791af3c59ca47 | |
| parent | e02ad2242ab98f9ea7418ef51741480e3bfa4ed1 (diff) | |
| download | brew-13dcdb3098d6c1089db937d5c122cf06a0631ac4.tar.bz2 | |
test_gpg2_requirement: add satisfied test
| -rw-r--r-- | Library/Homebrew/test/test_gpg2_requirement.rb | 24 |
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 |
