# File lib/webmock/request_stub.rb, line 61 def times(number) raise "times(N) accepts integers >= 1 only" if !number.is_a?(Fixnum) || number < 1 if @responses_sequences.empty? raise "Invalid WebMock stub declaration." + " times(N) can be declared only after response declaration." end @responses_sequences.last.times_to_repeat += number-1 self end