Class: Spec::Mocks::NegativeMessageExpectation

Inherits:
MessageExpectation show all
Defined in:
lib/spec/mocks/message_expectation.rb

Instance Attribute Summary

Attributes inherited from BaseExpectation

#sym

Instance Method Summary collapse

Methods inherited from MessageExpectation

#any_number_of_times, #at_least, #at_most, #exactly, #matches_name_but_not_args, #never, #once, #ordered, #times, #twice, #verify_messages_received, #with

Methods inherited from BaseExpectation

#and_raise, #and_return, #and_throw, #and_yield, #expected_args, #invoke, #matches

Constructor Details

#initialize(message, expectation_ordering, expected_from, sym, method_block) ⇒ NegativeMessageExpectation

Returns a new instance of NegativeMessageExpectation.



215
216
217
# File 'lib/spec/mocks/message_expectation.rb', line 215

def initialize(message, expectation_ordering, expected_from, sym, method_block)
  super(message, expectation_ordering, expected_from, sym, method_block, 0)
end

Instance Method Details

#negative_expectation_for?(sym) ⇒ Boolean

Returns:

  • (Boolean)


219
220
221
# File 'lib/spec/mocks/message_expectation.rb', line 219

def negative_expectation_for?(sym)
  return @sym == sym
end