-
Notifications
You must be signed in to change notification settings - Fork 10
Mock with kwargs as well #12
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
Conversation
|
Also, if you're already adding ruby 2.7 compatibility, please also add it to the travis matris (see b52709c ) |
In Ruby 2.7 sending the last arguments as a hash leads to a deprecation warning. By accepting the keyword arguments, the methods are fully wrapped.
|
Rebased. Technically the Gemfile change isn't needed, but I was in that file anyway to check. |
|
Looks like this breaks on older Ruby versions. Rather than stubbing it here, have you considered a gem like fakefs or setting up temporary directories? I'll also consider this lower priority. My other 2 PRs would be nice to get into a release. |
|
I like the Gemfile change. The travis failure is now what I saw on #14 : seems like older rubies need a default value for |
|
I have no preference either way. |
|
At this moment I have no time to finish this up due to other issues and it's not blocking me. I'll be happy if someone else picks this up, otherwise I'll get back to it once $work calms down again after the release. |
|
https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/ has some guidance on how to make this work |
|
Fixed this in #22 |
In Ruby 2.7 sending the last arguments as a hash leads to a deprecation warning. By accepting the keyword arguments, the methods are fully wrapped.