Module: Canned::Context::Matchers::Is

Included in:
Actor, Resource
Defined in:
lib/canned/context/matchers/is.rb

Instance Method Summary collapse

Instance Method Details

#is(_key) ⇒ Object Also known as: are

Test an expression or property

Examples:
   upon { a(:calculator).is(:is_open?) }
   upon { the(:user).is('level > 20') }

Parameters:

  • _key (String|Symbol)

    The value of _key is resolved in the current context object.



14
15
16
17
# File 'lib/canned/context/matchers/is.rb', line 14

def is(_key)
  return false unless indeed?
  Helpers.resolve(@stack.top, _key)
end