diff options
Diffstat (limited to 'Library/Homebrew/test/x11_requirement_spec.rb')
| -rw-r--r-- | Library/Homebrew/test/x11_requirement_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Library/Homebrew/test/x11_requirement_spec.rb b/Library/Homebrew/test/x11_requirement_spec.rb index f60c8bffe..bc02dc75a 100644 --- a/Library/Homebrew/test/x11_requirement_spec.rb +++ b/Library/Homebrew/test/x11_requirement_spec.rb @@ -33,4 +33,17 @@ describe X11Requirement do subject.modify_build_environment end end + + describe "#satisfied?", :needs_macos do + it "returns true if X11 is installed" do + expect(MacOS::XQuartz).to receive(:version).and_return("2.7.5") + expect(MacOS::XQuartz).to receive(:installed?).and_return(true) + expect(subject).to be_satisfied + end + + it "returns false if X11 is not installed" do + expect(MacOS::XQuartz).to receive(:installed?).and_return(false) + expect(subject).not_to be_satisfied + end + end end |
