Skip to content
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

Fix kwargs delegation warning in and_call_original #1383

Closed
wants to merge 2 commits into from

Conversation

pirj
Copy link
Member

@pirj pirj commented Dec 29, 2020

Depends on: rspec/rspec-support#475
Fixes: #1306
Supersedes: #1324
Based on: https://github.com/rspec/rspec-mocks/pull/1324/files#diff-afc11368b62c27a5bd155b766ec9cf4e96a9331d073b6123a9bce36a270de640R359

[ ] revert changes to Gemfile before merging (preferably after merging the accompanying rspec-support PR

@pirj pirj self-assigned this Dec 29, 2020
@pirj pirj added this to the RSpec 4 milestone Dec 29, 2020
@@ -98,7 +99,7 @@ def and_return(first_value, *values)
# expect(counter.count).to eq(original_count + 1)
def and_call_original
wrap_original(__method__) do |original, *args, &block|
original.call(*args, &block)
RSpec::Support::WithKeywordsWhenNeeded.call(original, *args, &block)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can't be used, it causes problems with arguments that implement to_hash and this module is being phased out for removal in RSpec 4.

@pirj pirj closed this Dec 29, 2020
@pirj pirj removed this from the RSpec 4 milestone Dec 29, 2020
@pirj pirj deleted the fix-kwargs-warning-in-and_call_original branch December 29, 2020 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants