Class: Capybara::RSpecMatchers::Matchers::NegatedMatcher
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Instance Chain:
self,
Compound ,
RSpec::Matchers::Composable
|
|
Inherits: | Object |
Defined in: | lib/capybara/rspec/matchers/base.rb |
Class Method Summary
- .new(matcher) ⇒ NegatedMatcher constructor
Instance Method Summary
- #description
- #does_not_match?(actual, &filter_block) ⇒ Boolean
- #failure_message
- #failure_message_when_negated
- #matches?(actual, &filter_block) ⇒ Boolean
Compound
- Included
Constructor Details
.new(matcher) ⇒ NegatedMatcher
# File 'lib/capybara/rspec/matchers/base.rb', line 86
def initialize(matcher) super() @matcher = matcher end
Instance Method Details
#description
[ GitHub ]# File 'lib/capybara/rspec/matchers/base.rb', line 99
def description "not #{@matcher.description}" end
#does_not_match?(actual, &filter_block) ⇒ Boolean
# File 'lib/capybara/rspec/matchers/base.rb', line 95
def does_not_match?(actual, &filter_block) @matcher.matches?(actual, &filter_block) end
#failure_message
[ GitHub ]# File 'lib/capybara/rspec/matchers/base.rb', line 103
def @matcher. end
#failure_message_when_negated
[ GitHub ]# File 'lib/capybara/rspec/matchers/base.rb', line 107
def @matcher. end
#matches?(actual, &filter_block) ⇒ Boolean
# File 'lib/capybara/rspec/matchers/base.rb', line 91
def matches?(actual, &filter_block) @matcher.does_not_match?(actual, &filter_block) end