0

Within an any_instance_of block, for example:

any_instance_of Tenancy do |tenancy|
   mock(Tenancy).update_checkout_booking.twice
end

how could I test that it runs three or more times? Using .never, .once, and .twice all work fine.

But to test three times I've tried .thrice, .exactly(3).times, and no joy.

user2475306
  • 334
  • 4
  • 12
  • seems like `mocha` since you are using `mock`. Also what is `any_instance_of`? I do not see an expectation here and "no joy" is not very explanatory as to the issue so this question is somewhat confusing. – engineersmnky Jun 03 '19 at 16:39
  • This answer might be helpful to you https://stackoverflow.com/a/33130513/247806 – Justin Leveck Jun 04 '19 at 05:13

0 Answers0