Class: Polyrun::Quick::FalseyMatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/polyrun/quick/matchers.rb

Instance Method Summary collapse

Instance Method Details

#does_not_match?(actual) ⇒ Boolean

Returns:

  • (Boolean)


95
96
97
# File 'lib/polyrun/quick/matchers.rb', line 95

def does_not_match?(actual)
  !matches?(actual)
end

#failure_message(actual) ⇒ Object



99
100
101
# File 'lib/polyrun/quick/matchers.rb', line 99

def failure_message(actual)
  "expected falsey, got #{actual.inspect}"
end

#failure_message_when_negated(actual) ⇒ Object



103
104
105
# File 'lib/polyrun/quick/matchers.rb', line 103

def failure_message_when_negated(actual)
  "expected truthy, got #{actual.inspect}"
end

#matches?(actual) ⇒ Boolean

Returns:

  • (Boolean)


91
92
93
# File 'lib/polyrun/quick/matchers.rb', line 91

def matches?(actual)
  !actual
end