Module: Rubyzen::Matchers
- Defined in:
- lib/rubyzen/matchers/zen_empty_matcher.rb,
lib/rubyzen/matchers/zen_true_matcher.rb,
lib/rubyzen/matchers/zen_false_matcher.rb
Overview
Custom RSpec matchers for asserting on Rubyzen collections.
Instance Method Summary collapse
-
#zen_empty(custom_message = nil, allowlist: nil, baseline: nil) ⇒ Object
Asserts that a Rubyzen collection is empty.
-
#zen_false(custom_message = nil, allowlist: nil, baseline: nil) {|item| ... } ⇒ Object
Asserts that a block returns false for every item in a collection.
-
#zen_true(custom_message = nil, allowlist: nil, baseline: nil) {|item| ... } ⇒ Object
Asserts that a block returns true for every item in a collection.
Instance Method Details
#zen_empty(custom_message = nil, allowlist: nil, baseline: nil) ⇒ Object
Asserts that a Rubyzen collection is empty.
Used in architectural lint rules to verify that no items match a forbidden pattern (e.g., no controllers call .where directly).
18 |
# File 'lib/rubyzen/matchers/zen_empty_matcher.rb', line 18 def zen_empty( = nil, allowlist: nil, baseline: nil); end |
#zen_false(custom_message = nil, allowlist: nil, baseline: nil) {|item| ... } ⇒ Object
Asserts that a block returns false for every item in a collection.
Supports allowlist: and baseline: for gradual adoption, matching items where the block returns true against exception lists.
18 |
# File 'lib/rubyzen/matchers/zen_false_matcher.rb', line 18 def zen_false( = nil, allowlist: nil, baseline: nil, &block); end |
#zen_true(custom_message = nil, allowlist: nil, baseline: nil) {|item| ... } ⇒ Object
Asserts that a block returns true for every item in a collection.
15 |
# File 'lib/rubyzen/matchers/zen_true_matcher.rb', line 15 def zen_true( = nil, allowlist: nil, baseline: nil, &block); end |