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
Rspec respond_to not functional with required keyword in call to new #1071
Comments
The underlying issue is that ruby defines
We solved this for rspec-mocks verifying doubles by looking at the signature of We could theoretically do the same for |
@myronmarston Interesting, thanks. Instead of a direct workaround of the ruby functionality on sending :new, would you support adding something like |
IMO, that's a worse API, and only solves the problem for developers who are aware of the issue. If we're going to solve this, I think we should automatically use the |
I took the time to implement this as #1072 |
Closing since @JonRowe implemented this. |
I have some code using rspec version 3.8 that doesn't produce the result expected at this link. If I create another class method with the same keywords and behaviour, it works without any issues.
This test fails with "expected Visit to respond to :new with keyword :facility," but I don't see how my usage is any different from the relishapp example docs (1 required and 2 other keyword arguments). Only in their case they're using
plant(seed:, fertilizer: nil, water: 'daily)
.The text was updated successfully, but these errors were encountered: