Class: Grasshopper::StubHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/grasshopper/stub.rb

Instance Method Summary collapse

Constructor Details

#initialize(stub, message) ⇒ StubHelper

Returns a new instance of StubHelper.



31
32
33
34
# File 'lib/grasshopper/stub.rb', line 31

def initialize(stub, message)
  @stub = stub
  @message = message
end

Instance Method Details

#then_return(retval) ⇒ Object



36
37
38
# File 'lib/grasshopper/stub.rb', line 36

def then_return(retval)
  @stub.add_a_stub(@message, retval)
end