Method: Object#ivar

Defined in:
lib/rucola/test_helper.rb

#ivar(name) ⇒ Object

A mocha helper to get at an instance variable without having to use instance_variable_get.

obj.ivar(:some_ivar).expects(:foo)


7
8
9
# File 'lib/rucola/test_helper.rb', line 7

def ivar(name)
  instance_variable_get("@#{name}".to_sym)
end