Class: CallCenter::Test::MiniTest::DSL::ItShouldFlow::Expects
- Inherits:
-
Expectation
- Object
- Expectation
- CallCenter::Test::MiniTest::DSL::ItShouldFlow::Expects
- Defined in:
- lib/call_center/test/minitest/dsl.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Expectation
Instance Method Summary collapse
-
#initialize(name, &blk) ⇒ Expects
constructor
A new instance of Expects.
- #setup(object) ⇒ Object
Constructor Details
#initialize(name, &blk) ⇒ Expects
Returns a new instance of 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 |