lib/rr/extensions/double_methods.rb in rr-0.1.8 vs lib/rr/extensions/double_methods.rb in rr-0.1.9

- old
+ new

@@ -28,9 +28,17 @@ def do_not_allow(subject, &definition) RR::Space.instance.create_do_not_allow_creator(subject, &definition) end alias_method :dont_allow, :do_not_allow + # Returns a AnyTimesMatcher. This is meant to be passed in as an argument + # to Scenario#times. + # + # mock(object).method_name(anything).times(any_times) {return_value} + def any_times + TimesCalledMatchers::AnyTimesMatcher.new + end + # Sets up an Anything wildcard ArgumentEqualityExpectation # that succeeds when passed any argument. # mock(object).method_name(anything) {return_value} # object.method_name("an arbitrary value") # passes def anything