Class: Capybara::RSpecMatchers::Matcher

Inherits:
Object
  • Object
show all
Defined in:
lib/capybara/rumpelstiltskin/spindle.rb

Overview

Re-open these classes as ‘super` was not working

Instance Method Summary collapse

Instance Method Details

#wrap_matches?(actual) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
10
11
12
13
14
# File 'lib/capybara/rumpelstiltskin/spindle.rb', line 7

def wrap_matches?(actual)
  Capybara::Rumpelstiltskin.with_sleep_injection(handled_exceptions: [Capybara::ExpectationNotMet]) do
    wrap(actual)
  end
rescue Capybara::ExpectationNotMet => e
  @failure_message = e.message
  return false
end