diff options
| author | Bob W. Hogg | 2017-02-20 09:42:43 -0800 | 
|---|---|---|
| committer | Bob W. Hogg | 2017-04-15 21:20:09 -0700 | 
| commit | 608d72a35fc437a0cf3e8da53729e479cde0be3d (patch) | |
| tree | 3f7534ed8fb65da220b7a6a227f7d27d53b0f678 /Library/Homebrew/test/os/mac | |
| parent | 02f0189335907805d422c817462674081f48ab60 (diff) | |
| download | brew-608d72a35fc437a0cf3e8da53729e479cde0be3d.tar.bz2 | |
OsxfuseRequirement: Port to Linux
Diffstat (limited to 'Library/Homebrew/test/os/mac')
| -rw-r--r-- | Library/Homebrew/test/os/mac/osxfuse_requirement_spec.rb | 36 | 
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  | 
