Sha256: 475c782ec3eeee76099007f838876388e19612f688487481368606f36bb93894

Contents?: true

Size: 441 Bytes

Versions: 69

Compression:

Stored size: 441 Bytes

Contents

RSpec::Matchers.define :match_realpath do |expected|

  match do |actual|
    actual == expected || realpath(actual) == realpath(expected)
  end

  failure_message do |actual|
    "expected that #{actual} would have a real path of #{expected}"
  end

  failure_message_when_negated do |actual|
    "expected that #{actual} would not have a real path of #{expected}"
  end

  def realpath(path)
    Pathname.new(path).realpath.to_s
  end
end

Version data entries

69 entries across 69 versions & 2 rubygems

Version Path
r10k-3.15.0 spec/matchers/match_realpath.rb
akerl-r10k-3.14.2.1 spec/matchers/match_realpath.rb
r10k-3.14.2 spec/matchers/match_realpath.rb
r10k-3.14.1 spec/matchers/match_realpath.rb
r10k-3.14.0 spec/matchers/match_realpath.rb
r10k-3.13.0 spec/matchers/match_realpath.rb
r10k-3.12.1 spec/matchers/match_realpath.rb
r10k-3.12.0 spec/matchers/match_realpath.rb
r10k-3.11.0 spec/matchers/match_realpath.rb
r10k-3.10.0 spec/matchers/match_realpath.rb
r10k-3.9.3 spec/matchers/match_realpath.rb
r10k-3.9.2 spec/matchers/match_realpath.rb
r10k-3.9.1 spec/matchers/match_realpath.rb
r10k-3.9.0 spec/matchers/match_realpath.rb
r10k-3.8.0 spec/matchers/match_realpath.rb
r10k-3.7.0 spec/matchers/match_realpath.rb
r10k-3.6.0 spec/matchers/match_realpath.rb
r10k-2.6.9 spec/matchers/match_realpath.rb
r10k-3.5.2 spec/matchers/match_realpath.rb
r10k-3.5.1 spec/matchers/match_realpath.rb