Class: Playwright::Test::Matchers::PlaywrightMatcher
- Inherits:
-
Object
- Object
- Playwright::Test::Matchers::PlaywrightMatcher
- Defined in:
- lib/playwright/test.rb
Instance Method Summary collapse
- #does_not_match?(actual) ⇒ Boolean
- #failure_message ⇒ Object
- #failure_message_when_negated ⇒ Object
-
#initialize(expectation_method, *args, **kwargs) ⇒ PlaywrightMatcher
constructor
A new instance of PlaywrightMatcher.
- #matches?(actual) ⇒ Boolean
Constructor Details
#initialize(expectation_method, *args, **kwargs) ⇒ PlaywrightMatcher
Returns a new instance of PlaywrightMatcher.
57 58 59 60 61 |
# File 'lib/playwright/test.rb', line 57 def initialize(expectation_method, *args, **kwargs) @method = expectation_method @args = args @kwargs = kwargs end |
Instance Method Details
#does_not_match?(actual) ⇒ Boolean
71 72 73 74 75 76 77 |
# File 'lib/playwright/test.rb', line 71 def does_not_match?(actual) Expect.new.call(actual, true).send(@method, *@args, **@kwargs) true rescue AssertionError => e = e. false end |
#failure_message ⇒ Object
79 80 81 |
# File 'lib/playwright/test.rb', line 79 def end |
#failure_message_when_negated ⇒ Object
83 84 85 |
# File 'lib/playwright/test.rb', line 83 def end |
#matches?(actual) ⇒ Boolean
63 64 65 66 67 68 69 |
# File 'lib/playwright/test.rb', line 63 def matches?(actual) Expect.new.call(actual, false).send(@method, *@args, **@kwargs) true rescue AssertionError => e = e. false end |