Object
A composite expectation allows several expectations to be grouped into a single composite and then apply the same constraints to all expectations in the group.
Add an expectation to the composite.
# File lib/flexmock/expectation.rb, line 407
407: def add(expectation)
408: @expectations << expectation
409: end
Apply the constraint method to all expectations in the composite.
# File lib/flexmock/expectation.rb, line 412
412: def method_missing(sym, *args, &block)
413: @expectations.each do |expectation|
414: expectation.send(sym, *args, &block)
415: end
416: self
417: end
Return the associated mock object.
# File lib/flexmock/expectation.rb, line 428
428: def mock
429: @expectations.first.mock
430: end
Return the order number of the first expectation in the list.
# File lib/flexmock/expectation.rb, line 423
423: def order_number
424: @expectations.first.order_number
425: end
Start a new method expectation. The following constraints will be applied to the new expectation.
# File lib/flexmock/expectation.rb, line 434
434: def should_receive(*args, &block)
435: @expectations.first.mock.should_receive(*args, &block)
436: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.