rspec-mocks
rspec-mocks copied to clipboard
Matching argument on stub with range that cannot be iterated fails
When you have multiple stubs on a method with different arguments there is a check performed to see which stub should be called based on the argument.
If the argument is a range, a comparison is done to find which range the argument is within. This fails when the range is ActiveSupport::TimeWithZone or any other Time as they can not be iterated over.
Example test repo here demonstrating the problem: https://github.com/chrisface/rspec_bug/blob/master/example_spec.rb
Hm thats unfortunate, if you'd like to make an attempt at fixing it I'll happily help review
Closing due to inactivity during the monorepo migration.