test_gpg2_requirement: add satisfied test
This commit is contained in:
parent
e02ad2242a
commit
13dcdb3098
24
Library/Homebrew/test/test_gpg2_requirement.rb
Normal file
24
Library/Homebrew/test/test_gpg2_requirement.rb
Normal file
@ -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
|
||||||
Loading…
x
Reference in New Issue
Block a user