Module: Canned::Context::Matchers::AsksFor

Included in:
Actor, Default
Defined in:
lib/canned/context/matchers/asks_for.rb

Instance Method Summary collapse

Instance Method Details

#asked_for(*_actions) ⇒ Object Also known as: asks_for

Tests the action name

Parameters:

  • _actions (String|Symbol)

    actions that will return true



11
12
13
# File 'lib/canned/context/matchers/asks_for.rb', line 11

def asked_for(*_actions)
  _actions.any? { |a| a.to_s == @ctx.action_name }
end