Method: Riot::RespondToMacro#evaluate
- Defined in:
- lib/riot/assertion_macros/respond_to.rb
#evaluate(actual, expected) ⇒ Array
Supports positive assertion testing. This is where magic happens.
16 17 18 19 20 21 22 |
# File 'lib/riot/assertion_macros/respond_to.rb', line 16 def evaluate(actual, expected) if actual.respond_to?(expected) pass(.responds_to(expected)) else fail(.method(expected).is_not_defined) end end |