-
-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors on ranges not handled correctly #938
Comments
Thanks for reporting this, @joevandyk. I believe this is a bug in time range objects --- https://bugs.ruby-lang.org/issues/11113 I'd rather not put special-case handling in RSpec for time range objects to avoid calling |
As a temporary work around, you can wrap your range object in the it 'accepts a time range' do
range = Time.new...Time.new
expect(a_double).to receive(:random_call).with(range: an_object_eq_to(range))
a_double.random_call(range: 1)
end Not great, but it works. |
So it looks like the ruby core team has promptly fixed this: Given that it's a ruby bug that has already been fixed and there's a reasonable work around shown above, I don't think it makes sense for us to put special case code in rspec to work around this. I'm going to close this. Thanks again for reporting it, @joevandyk. |
fails with not what I'd expect.
The text was updated successfully, but these errors were encountered: