aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/os/mac
diff options
context:
space:
mode:
authorMike McQuaid2017-04-20 17:14:42 +0100
committerGitHub2017-04-20 17:14:42 +0100
commit2be7999878702554f1e1b5f4118978e670e6156c (patch)
treed3ca5289ad4bd7d510b33c05351dda6b558cca76 /Library/Homebrew/test/os/mac
parent67a0a89b100b36adec735601e90082eeef3456a1 (diff)
parent7b6abc76302065204e03054c0a3cd040e158efda (diff)
downloadbrew-2be7999878702554f1e1b5f4118978e670e6156c.tar.bz2
Merge pull request #2274 from rwhogg/fuse-requirement
Port OsxfuseRequirement to Linux
Diffstat (limited to 'Library/Homebrew/test/os/mac')
-rw-r--r--Library/Homebrew/test/os/mac/osxfuse_requirement_spec.rb36
1 files changed, 36 insertions, 0 deletions
diff --git a/Library/Homebrew/test/os/mac/osxfuse_requirement_spec.rb b/Library/Homebrew/test/os/mac/osxfuse_requirement_spec.rb
new file mode 100644
index 000000000..06d3d885e
--- /dev/null
+++ b/Library/Homebrew/test/os/mac/osxfuse_requirement_spec.rb
@@ -0,0 +1,36 @@
+require "requirements/osxfuse_requirement"
+
+describe OsxfuseRequirement do
+ subject { described_class.new([]) }
+
+ describe "::binary_osxfuse_installed?" do
+ it "returns false if fuse.h does not exist" do
+ allow(File).to receive(:exist?).and_return(false)
+ expect(described_class).not_to be_binary_osxfuse_installed
+ end
+
+ it "returns false if osxfuse include directory is a symlink" do
+ allow(File).to receive(:exist?).and_return(true)
+ allow(File).to receive(:symlink?).and_return(true)
+ expect(described_class).not_to be_binary_osxfuse_installed
+ end
+ end
+
+ describe "environment" do
+ it "adds the fuse directories to the appropriate paths" do
+ expect(ENV).to receive(:append_path).with("PKG_CONFIG_PATH", any_args)
+ expect(ENV).to receive(:append_path).with("HOMEBREW_LIBRARY_PATHS", any_args)
+ expect(ENV).to receive(:append_path).with("HOMEBREW_INCLUDE_PATHS", any_args)
+ subject.modify_build_environment
+ end
+ end
+end
+
+describe NonBinaryOsxfuseRequirement do
+ subject { described_class.new([]) }
+
+ describe "#message" do
+ msg = /osxfuse is already installed from the binary distribution/
+ its(:message) { is_expected.to match(msg) }
+ end
+end