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


51
52
53
54
# File 'lib/call_center/test/minitest/dsl.rb', line 51

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

Instance Method Details

#setup(object) ⇒ Object


56
57
58
59
# File 'lib/call_center/test/minitest/dsl.rb', line 56

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