Class: RSpec::Mocks::NegativeMessageExpectation
- Inherits:
-
MessageExpectation
- Object
- BaseExpectation
- MessageExpectation
- RSpec::Mocks::NegativeMessageExpectation
- Defined in:
- lib/rspec/mocks/message_expectation.rb
Instance Attribute Summary
Attributes inherited from BaseExpectation
Instance Method Summary collapse
-
#initialize(message, expectation_ordering, expected_from, sym, method_block) ⇒ NegativeMessageExpectation
constructor
A new instance of NegativeMessageExpectation.
- #negative_expectation_for?(sym) ⇒ Boolean
Methods inherited from MessageExpectation
#advise, #any_number_of_times, #at_least, #at_most, #exactly, #expected_messages_received?, #generate_error, #ignoring_args?, #matches_at_least_count?, #matches_at_most_count?, #matches_exact_count?, #matches_name_but_not_args, #never, #once, #ordered, #similar_messages, #times, #twice, #verify_messages_received, #with
Methods inherited from BaseExpectation
#and_raise, #and_return, #and_throw, #and_yield, #build_child, #called_max_times?, #expected_args, #invoke, #matches?
Constructor Details
#initialize(message, expectation_ordering, expected_from, sym, method_block) ⇒ NegativeMessageExpectation
Returns a new instance of NegativeMessageExpectation.
331 332 333 |
# File 'lib/rspec/mocks/message_expectation.rb', line 331 def initialize(, expectation_ordering, expected_from, sym, method_block) super(, expectation_ordering, expected_from, sym, method_block, 0) end |
Instance Method Details
#negative_expectation_for?(sym) ⇒ Boolean
335 336 337 |
# File 'lib/rspec/mocks/message_expectation.rb', line 335 def negative_expectation_for?(sym) return @sym == sym end |