aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMarkus Reiter2017-02-09 19:01:46 +0100
committerMarkus Reiter2017-02-09 19:02:38 +0100
commit31c51108ce43ae97f6b8c061be90ccc1a567010b (patch)
tree885d60819c3d4097a7715992e2d8378ff84493db /Library
parent6cd36428505b1b3548b1e15fe7e0a850b2e2aeaa (diff)
downloadbrew-31c51108ce43ae97f6b8c061be90ccc1a567010b.tar.bz2
Use explicit checks instead of custom matcher.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cask/spec/cask/artifact/binary_spec.rb6
-rw-r--r--Library/Homebrew/cask/spec/spec_helper.rb1
-rw-r--r--Library/Homebrew/cask/spec/support/file_matchers.rb9
3 files changed, 4 insertions, 12 deletions
diff --git a/Library/Homebrew/cask/spec/cask/artifact/binary_spec.rb b/Library/Homebrew/cask/spec/cask/artifact/binary_spec.rb
index b606aba1b..c27dcc8f0 100644
--- a/Library/Homebrew/cask/spec/cask/artifact/binary_spec.rb
+++ b/Library/Homebrew/cask/spec/cask/artifact/binary_spec.rb
@@ -20,7 +20,8 @@ describe Hbc::Artifact::Binary do
shutup do
Hbc::Artifact::Binary.new(cask).install_phase
end
- expect(expected_path).to be_a_valid_symlink
+ expect(expected_path).to be_a_symlink
+ expect(expected_path.readlink).to exist
end
it "avoids clobbering an existing binary by linking over it" do
@@ -82,7 +83,8 @@ describe Hbc::Artifact::Binary do
Hbc::Artifact::Binary.new(cask).install_phase
end
- expect(expected_path).to be_a_valid_symlink
+ expect(expected_path).to be_a_symlink
+ expect(expected_path.readlink).to exist
end
end
end
diff --git a/Library/Homebrew/cask/spec/spec_helper.rb b/Library/Homebrew/cask/spec/spec_helper.rb
index 548691f19..eefee3d60 100644
--- a/Library/Homebrew/cask/spec/spec_helper.rb
+++ b/Library/Homebrew/cask/spec/spec_helper.rb
@@ -34,5 +34,4 @@ end
RSpec.configure do |config|
config.order = :random
config.include(Test::Helper::Shutup)
- config.include(FileMatchers)
end
diff --git a/Library/Homebrew/cask/spec/support/file_matchers.rb b/Library/Homebrew/cask/spec/support/file_matchers.rb
deleted file mode 100644
index d3e62f45a..000000000
--- a/Library/Homebrew/cask/spec/support/file_matchers.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-module FileMatchers
- extend RSpec::Matchers::DSL
-
- matcher :be_a_valid_symlink do
- match do |path|
- path.symlink? && path.readlink.exist?
- end
- end
-end