Class: Minicrest::Falsy
- Defined in:
- lib/minicrest/value_matchers.rb
Overview
Matcher that checks Ruby falsiness.
Instance Method Summary collapse
- #description ⇒ Object
- #failure_message(actual) ⇒ Object
- #matches?(actual) ⇒ Boolean
- #negated_failure_message(actual) ⇒ Object
Methods inherited from Matcher
Instance Method Details
#description ⇒ Object
50 51 52 |
# File 'lib/minicrest/value_matchers.rb', line 50 def description 'falsy' end |
#failure_message(actual) ⇒ Object
54 55 56 |
# File 'lib/minicrest/value_matchers.rb', line 54 def (actual) "expected #{actual.inspect} to be falsy" end |
#matches?(actual) ⇒ Boolean
46 47 48 |
# File 'lib/minicrest/value_matchers.rb', line 46 def matches?(actual) !actual end |
#negated_failure_message(actual) ⇒ Object
58 59 60 |
# File 'lib/minicrest/value_matchers.rb', line 58 def (actual) "expected #{actual.inspect} not to be falsy, but it was" end |