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

module Matchers
  module HaveSnippetDescription
    RSpec::Matchers.define :have_snippet_description do |description|
      match do |page_object|
        page_object.has_snippet_description?(description)
      end

      match_when_negated do |page_object|
        page_object.has_no_snippet_description?
      end
    end
  end
end