Module: RSpec::ProcessMocks::MethodDouble
- Included in:
- Mocks::MethodDouble
- Defined in:
- lib/rspec/process_mocks/method_double.rb
Instance Method Summary collapse
-
#add_child_process_expectation(error_generator, expectation_ordering, expected_from, opts, &block) ⇒ Object
This has no checking for existing expectations on this object (like RSpec does).
Instance Method Details
#add_child_process_expectation(error_generator, expectation_ordering, expected_from, opts, &block) ⇒ Object
This has no checking for existing expectations on this object (like RSpec does). It will probably only work if you set one expectation per object.
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/rspec/process_mocks/method_double.rb', line 6 def add_child_process_expectation(error_generator, expectation_ordering, expected_from, opts, &block) configure_method # expectation = if existing_stub = stubs.first # existing_stub.build_child(expected_from, block, 1, opts) # else # ChildProcessMessageExpectation.new(error_generator, expectation_ordering, expected_from, @method_name, block, 1, opts) # end # expectations << expectation expectation = ChildProcessMessageExpectation.new(error_generator, expectation_ordering, expected_from, @method_name, block, 1, opts) expectations << expectation expectation end |