summaryrefslogtreecommitdiff
path: root/qa/spec/support/matchers/have_file.rb
blob: 2ae295d5ca22f7bb463bc2fe3840099ed3dcff8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module Matchers
  module HaveFile
    RSpec::Matchers.define :have_file do |file|
      match do |page_object|
        page_object.has_file?(file)
      end

      match_when_negated do |page_object|
        page_object.has_no_file?(file)
      end
    end
  end
end