Class: Adyen::Matchers::HaveAdyenPaymentForm

Inherits:
Object
  • Object
show all
Defined in:
lib/adyen/matchers.rb

Instance Method Summary collapse

Constructor Details

#initialize(checks) ⇒ HaveAdyenPaymentForm

Returns a new instance of HaveAdyenPaymentForm.



53
54
55
# File 'lib/adyen/matchers.rb', line 53

def initialize(checks)
  @checks = checks
end

Instance Method Details

#descriptionObject



61
62
63
# File 'lib/adyen/matchers.rb', line 61

def description
  "have an adyen payment form"
end

#failure_messageObject



65
66
67
# File 'lib/adyen/matchers.rb', line 65

def failure_message
  "expected to find a valid Adyen form on this page"
end

#matches?(document) ⇒ Boolean

Returns:

  • (Boolean)


57
58
59
# File 'lib/adyen/matchers.rb', line 57

def matches?(document)
  Adyen::Matchers::XPathPaymentFormCheck.check(document, @checks)
end

#negative_failure_messageObject



69
70
71
# File 'lib/adyen/matchers.rb', line 69

def negative_failure_message
  "expected not to find a valid Adyen form on this page"
end