Skip to content

Commit

Permalink
document cardinality methods equivalence
Browse files Browse the repository at this point in the history
  • Loading branch information
nitishr committed Mar 1, 2025
1 parent 87b84ea commit 4ffa826
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mocha/expectation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def once
times(1)
end

# Modifies expectation so that the expected method must never be called.
# Modifies expectation so that the expected method must never be called. This is equivalent to calling {#times} with an argument of +0+.
#
# @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained.
#
Expand Down Expand Up @@ -180,7 +180,7 @@ def at_least_once
at_least(1)
end

# Modifies expectation so that the expected method must be called at most a +maximum_number_of_times+.
# Modifies expectation so that the expected method must be called at most a +maximum_number_of_times+. This is equivalent to calling {#times} with an argument of +0..maximum_number_of_times+
#
# @param [Integer] maximum_number_of_times maximum number of expected invocations.
# @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained.
Expand Down

0 comments on commit 4ffa826

Please sign in to comment.