class RSpec::Mocks::NegativeMessageExpectation

@private

Public Class Methods

new(error_generator, expectation_ordering, expected_from, method_double, &implementation) click to toggle source

@private

Calls superclass method RSpec::Mocks::MessageExpectation.new
# File lib/rspec/mocks/message_expectation.rb, line 440
def initialize(error_generator, expectation_ordering, expected_from, method_double, &implementation)
  super(error_generator, expectation_ordering, expected_from, method_double, 0, {}, &implementation)
end

Public Instance Methods

and_return(*) click to toggle source
# File lib/rspec/mocks/message_expectation.rb, line 444
      def and_return(*)
        # no-op
        # @deprecated and_return is not supported with negative message expectations.
        RSpec::Mocks.warn_deprecation <<-MSG

DEPRECATION: `and_return` with `should_not_receive` is deprecated. Called from #{caller(0)[1]}
MSG
      end
negative_expectation_for?(message) click to toggle source

@private

# File lib/rspec/mocks/message_expectation.rb, line 454
def negative_expectation_for?(message)
  return @message == message
end