-
-
Notifications
You must be signed in to change notification settings - Fork 909
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
Matcher delegate_method supports 'private: true' #1653
Matcher delegate_method supports 'private: true' #1653
Conversation
1e34a9c
to
a0a2ab5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the contribution!
a0a2ab5
to
dff710b
Compare
@matsales28 Sweet! It is a pure pleasure to work with code specified that well with RSpec 🙏 |
Found one edge-case that still needs coverage: it { is_expected.to delegate_method(:videos).to(:current_user).with_prefix('user').with_private } Generates error:
|
Yeah, it should also be good to test it in conjunction with the it { is_expected.to delegate_method(:videos).to(:current_user).with_prefix('user').as(:new_videos) } Please let me know if you intend to add the coverage, we can wait for it to merge this PR, otherwise, I can work on improving the coverage, we'll likely need to change the code itself a bit as well to match the error message better. |
dff710b
to
9c62dbb
Compare
@matsales28 force-pushed two commits again. The first one specify all combinations. Waiting to see those error messages changes. |
@pr0d1r2 Thanks again for the contribution, I just merged it! |
Allow to specify
delegate_method
usingwith_private
- which is described in documentation: