Class: ArchUnit::Testing::RSpecPassMatcher
- Inherits:
-
Object
- Object
- ArchUnit::Testing::RSpecPassMatcher
- Defined in:
- lib/archunit/testing/rspec_adapter.rb
Overview
RSpec's matcher protocol, delegating all evaluation and prose to shared testing code.
Instance Method Summary collapse
-
#does_not_match?(rule) ⇒ Boolean
RSpec's matcher protocol fixes this method name.
-
#failure_message ⇒ Object
(also: #failure_message_when_negated)
rubocop:enable Naming/PredicatePrefix.
-
#initialize(options = nil) ⇒ RSpecPassMatcher
constructor
A new instance of RSpecPassMatcher.
- #matches?(rule) ⇒ Boolean
Constructor Details
#initialize(options = nil) ⇒ RSpecPassMatcher
Returns a new instance of RSpecPassMatcher.
7 8 9 |
# File 'lib/archunit/testing/rspec_adapter.rb', line 7 def initialize( = nil) @options = end |
Instance Method Details
#does_not_match?(rule) ⇒ Boolean
RSpec's matcher protocol fixes this method name. rubocop:disable Naming/PredicatePrefix
17 18 19 |
# File 'lib/archunit/testing/rspec_adapter.rb', line 17 def does_not_match?(rule) matches_expectation?(rule, expected_to_pass: false) end |
#failure_message ⇒ Object Also known as: failure_message_when_negated
rubocop:enable Naming/PredicatePrefix
22 23 24 |
# File 'lib/archunit/testing/rspec_adapter.rb', line 22 def result. end |
#matches?(rule) ⇒ Boolean
11 12 13 |
# File 'lib/archunit/testing/rspec_adapter.rb', line 11 def matches?(rule) matches_expectation?(rule, expected_to_pass: true) end |