Use explicit checks instead of custom matcher.
This commit is contained in:
parent
6cd3642850
commit
31c51108ce
@ -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
|
||||
|
||||
@ -34,5 +34,4 @@ end
|
||||
RSpec.configure do |config|
|
||||
config.order = :random
|
||||
config.include(Test::Helper::Shutup)
|
||||
config.include(FileMatchers)
|
||||
end
|
||||
|
||||
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user