Class NotAMock::Matchers::AnythingMatcher
In: lib/not_a_mock/matchers/anything_matcher.rb
Parent: CallMatcher

Matcher for

  object.should have_been_called

Methods

Public Class methods

[Source]

    # File lib/not_a_mock/matchers/anything_matcher.rb, line 9
 9:       def initialize(parent = nil)
10:         super parent
11:       end

Public Instance methods

[Source]

    # File lib/not_a_mock/matchers/anything_matcher.rb, line 18
18:       def failure_message_without_parents
19:         if matched?
20:           " was called"
21:         else
22:           " was never called"
23:         end
24:       end

[Source]

    # File lib/not_a_mock/matchers/anything_matcher.rb, line 13
13:       def matches_without_parents?
14:         @calls = CallRecorder.instance.calls_by_object(@object)
15:         !@calls.empty?
16:       end

[Validate]