Class: CallCenter::Test::MiniTest::DSL::ItShouldFlow::Expects

Inherits:
Expectation show all
Defined in:
lib/call_center/test/minitest/dsl.rb

Direct Known Subclasses

Stubs

Instance Attribute Summary

Attributes inherited from Expectation

#name

Instance Method Summary collapse

Constructor Details

#initialize(name, &blk) ⇒ Expects

Returns a new instance of Expects.



43
44
45
46
# File 'lib/call_center/test/minitest/dsl.rb', line 43

def initialize(name, &blk)
  super(name)
  @expectation_block = blk
end

Instance Method Details

#setup(object) ⇒ Object



48
49
50
51
# File 'lib/call_center/test/minitest/dsl.rb', line 48

def setup(object)
  mocka = object.expects(name)
  @expectation_block.call(mocka) if @expectation_block
end