From fbe8dc8fc679beea8dacd0c0bf7b6d7a1b073374 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 2 Jul 2014 00:25:01 -0500 Subject: Add a test that exercises the code in X11Dependency#satisfied? --- Library/Homebrew/test/test_x11_dependency.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Library') 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 -- cgit v1.2.3