Add a test that exercises the code in X11Dependency#satisfied?

This commit is contained in:
Jack Nagel 2014-07-02 00:25:01 -05:00
parent 4743105216
commit fbe8dc8fc6

View File

@ -32,4 +32,12 @@ class X11DependencyTests < Homebrew::TestCase
ENV.expects(:x11)
x.modify_build_environment
end
def test_satisfied
MacOS::XQuartz.stubs(:installed?).returns(true)
assert_predicate X11Dependency.new, :satisfied?
MacOS::XQuartz.stubs(:installed?).returns(false)
refute_predicate X11Dependency.new, :satisfied?
end
end