Welcome to mirror list, hosted at ThFree Co, Russian Federation.

have_file_content.rb « matchers « support « spec « qa - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e42ece6d59eebfb9028c5fae33a2ee85ee33e248 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module Matchers
  module HaveFileContent
    RSpec::Matchers.define :have_file_content do |file_content, file_number|
      match do |page_object|
        page_object.has_file_content?(file_content, file_number)
      end

      match_when_negated do |page_object|
        page_object.has_no_file_content?(file_content, file_number)
      end
    end
  end
end