APIdock / RSpec
/
Browse About
method

add_message_expectation

1.3.0 - Show latest stable - Class: Spec::Mocks::Proxy
add_message_expectation(expected_from, sym, opts={}, &block)
public

No documentation available.

# File lib/spec/mocks/proxy.rb, line 40
      def add_message_expectation(expected_from, sym, opts={}, &block)        
        __add sym
        warn_if_nil_class sym
        @expectations << build_expectation(expected_from, sym, opts, &block)
        @expectations.last
      end

Related methods

  • Instance methods
  • add_message_expectation
  • add_negative_message_expectation
  • add_stub
  • as_null_object
  • build_expectation
  • find_matching_method_stub
  • has_negative_expectation?
  • invoke_expectation
  • message_received
  • null_object?
  • ok_to_invoke_stub?
  • raise_unexpected_message_args_error
  • raise_unexpected_message_error
  • received_message?
  • record_almost_matching_expectation
  • record_message_received
  • record_stub
  • remove_stub
  • reset
  • verify
  • Class methods
  • allow_message_expectations_on_nil
  • new
  • Private methods
  • private__add
  • privatealmost_matching_expectation
  • privateclear_expectations
  • privateclear_proxied_methods
  • privateclear_stubs
  • privatedefine_expected_method
  • privatefind_almost_matching_expectation
  • privatefind_matching_expectation
  • privatemunge
  • privateproxy_for_nil_class?
  • privatereset_nil_expectations_warning
  • privatereset_proxied_method
  • privatereset_proxied_methods
  • privatetarget_metaclass
  • privatetarget_responds_to?
  • privateverify_expectations
  • privatevisibility
  • privatewarn_if_nil_class
APIdock API Documentation Browser

© 2026 APIdock