Sha256: 3985b078ada1eab8120d6559d34a558700c96bbc76344bdad72def901b827898

Contents?: true

Size: 286 Bytes

Versions: 4

Compression:

Stored size: 286 Bytes

Contents

module Longleaf
  # Match if the parameter is a {FileRecord} with the expected path
  RSpec::Matchers.define :be_file_record_for do |expected|
    match do |actual|
      return false if actual.nil? || !actual.is_a?(Longleaf::FileRecord)
      actual.path == expected
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
longleaf-1.1.1 lib/longleaf/specs/custom_matchers.rb
longleaf-1.1.0 lib/longleaf/specs/custom_matchers.rb
longleaf-1.0.0 lib/longleaf/specs/custom_matchers.rb
longleaf-0.3.0 lib/longleaf/specs/custom_matchers.rb