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

Reduce boilerplate code in RubyLexTest #644

Merged
merged 3 commits into from
Jul 18, 2023
Merged

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Jul 14, 2023

The parentheses of (Prompt)Row.new are very distracting when trying to read through RubyLex tests. And there are also many boilerplate in this file that can be extracted away.

It'd be easier to review by commits.

@st0012 st0012 self-assigned this Jul 14, 2023
@st0012 st0012 requested a review from tompng July 15, 2023 21:24
Copy link
Member

@tompng tompng left a comment

Choose a reason for hiding this comment

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

👍

@st0012 st0012 merged commit 1ba586c into master Jul 18, 2023
47 checks passed
@st0012 st0012 deleted the refactor-ruby-lex-test branch July 18, 2023 15:18
matzbot pushed a commit to ruby/ruby that referenced this pull request Jul 18, 2023
(ruby/irb#644)

* Avoid initialising Row at every test input

* Extract common assertion patterns into methods

* Remove unnecessary PromptRow strcut and boilerplate code

ruby/irb@1ba586c0c6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants