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

override inspect() of ref and lazy to make description readable #65

Conversation

shinji-yoshida
Copy link
Contributor

This PR makes description readable.

Currently, failed spec looks like:

Failures:

  1) RSpec::Parameterized lazy a: #<RSpec::Parameterized::RefArg:0x00007fd356a1ff50 @symbol=:one>, b: #<RSpec::Parameterized::RefArg:0x00007fd356a1ff28 @symbol=:four>, answer: #<RSpec::Parameterized::LazyArg:0x00007fd356a1fed8 @block=#<Proc:0x00007fd356a1fe88@/Users/shinji_yoshida/workspace/rspec-parameterized/spec/parametarized_spec.rb:224>> define two and three after where block fail
                                 Failure/Error: expect(a + b + 1).to eq answer

expected: 5
got: 6

(compared using ==)
# ./spec/parametarized_spec.rb:238:in `block (5 levels) in <top (required)>'

After This PR applied, failed spec will look like:

Failures:

  1) RSpec::Parameterized lazy a: one, b: four, answer: lazy { two + three } define two and three after where block fail
Failure/Error: expect(a + b + 1).to eq answer

expected: 5
got: 6

(compared using ==)
# ./spec/parametarized_spec.rb:238:in `block (5 levels) in <top (required)>'

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.

Thanks!!
I apologize for the late response.
It looks good to me.

@joker1007 joker1007 merged commit 0e6332d into tomykaira:master Jun 29, 2021
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