class Playwright::Test::Matchers::PlaywrightMatcher

def failure_message

def failure_message
  @failure_message
end

def failure_message_when_negated

its own negation
we have to invert the message again here because RSpec wants to control
def failure_message_when_negated
  @failure_message.gsub("expected to", "not expected to")
end

def initialize(expectation_method, *args, **kwargs)

def initialize(expectation_method, *args, **kwargs)
  @method = expectation_method
  @args = args
  @kwargs = kwargs
end

def matches?(actual)

def matches?(actual)
  Expect.new.call(actual).send(@method, *@args, **@kwargs)
  true
rescue AssertionError => e
  @failure_message = e.full_message
  false
end