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

Changes to apply method calls recursively when parameter is Array or Hash. #75

Merged
merged 1 commit into from
Jan 4, 2022

Conversation

yiyenene
Copy link
Contributor

what

Implements recursive_apply method that is calls apply method of Arg class to children of Array or Hash parameters.

why

When I want to use array or hash parameters with ref or lazy, it didn't applies properly.

let(:foo) { 1 }

where(:values, :answer) do
  [
    [[ref(:foo), 2], 2],
  ]
end

with_them do
  it { expect(values.sum).to eq(answer) } # values => [:foo, 2] 
end

@sue445 sue445 requested review from sue445 and joker1007 January 3, 2022 11:57
@sue445
Copy link
Collaborator

sue445 commented Jan 3, 2022

I think this is LGTM.

@joker1007 How do you think?

Copy link
Collaborator

@joker1007 joker1007 left a comment

Choose a reason for hiding this comment

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

LGTM.
Thank you so much!

@sue445 sue445 merged commit 076f694 into tomykaira:master Jan 4, 2022
@sue445
Copy link
Collaborator

sue445 commented Jan 4, 2022

@yiyenene I released v0.5.1 💎
https://github.com/tomykaira/rspec-parameterized/blob/master/CHANGELOG.md#v051-2022-01-04

@yiyenene yiyenene deleted the recursive_apply branch January 4, 2022 08:48
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.

3 participants