aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-07-02 00:25:01 -0500
committerJack Nagel2014-07-02 00:25:01 -0500
commitfbe8dc8fc679beea8dacd0c0bf7b6d7a1b073374 (patch)
tree4dc814555322b8c0e9cdfc5b27c35d15a0ae6832 /Library
parent474310521662bce58084eb4d237519980704ecca (diff)
downloadbrew-fbe8dc8fc679beea8dacd0c0bf7b6d7a1b073374.tar.bz2
Add a test that exercises the code in X11Dependency#satisfied?
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/test_x11_dependency.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_x11_dependency.rb b/Library/Homebrew/test/test_x11_dependency.rb
index fd0b25328..31fa92d07 100644
--- a/Library/Homebrew/test/test_x11_dependency.rb
+++ b/Library/Homebrew/test/test_x11_dependency.rb
@@ -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