| Class | NotAMock::Matchers::TimesMatcher |
| In: |
lib/not_a_mock/matchers/times_matcher.rb
|
| Parent: | CallMatcher |
Matcher for once, twice, and
exactly(n).times
# File lib/not_a_mock/matchers/times_matcher.rb, line 9
9: def initialize(times, parent = nil)
10: super parent
11: @times = times
12: end
# File lib/not_a_mock/matchers/times_matcher.rb, line 19
19: def failure_message_without_parents
20: if matched?
21: ", #{times_in_english(@parent.calls.length)}"
22: else
23: ", but #{times_in_english(@parent.calls.length, true)}"
24: end
25: end