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

Use let to remove duplication in specs #3728

Merged
merged 7 commits into from
Sep 30, 2019
Merged

Use let to remove duplication in specs #3728

merged 7 commits into from
Sep 30, 2019

Conversation

javierm
Copy link
Member

@javierm javierm commented Sep 25, 2019

Objectives

  • Simplify data setup in specs
  • Make it easier to remove useless assignments while maintaining the code vertically aligned

@javierm javierm added the Specs label Sep 25, 2019
@javierm javierm self-assigned this Sep 25, 2019
@javierm javierm added this to Reviewing in Roadmap via automation Sep 25, 2019
@javierm javierm force-pushed the simplify_valuator_factories branch 2 times, most recently from 4965814 to c6808c9 Compare September 30, 2019 13:21
This way we can reuse the code (in some cases) and we can avoid instance
variables (in some other cases).
Now that we've moved the `draft_version` variable with `let`, these
variables can be removed without making it harder to read the code
vertically.
This way we can remove a useless assignment without making the code
harder to read vertically.
We remove duplication, and we better isolate useless assignments.
These variables were only used in the `validations` block; the rest of
the tests re-defined them, making the code hard to follow.
@javierm javierm changed the base branch from simplify_valuator_factories to master September 30, 2019 13:57
@javierm javierm merged commit a43a313 into master Sep 30, 2019
Roadmap automation moved this from Reviewing to Release 1.1.0 Sep 30, 2019
@javierm javierm deleted the use_let branch September 30, 2019 14:18
smarques pushed a commit to venetochevogliamo/consul that referenced this pull request Apr 29, 2020
Use `let` to remove duplication in specs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Roadmap
  
Release 1.1.0
Development

Successfully merging this pull request may close these issues.

None yet

2 participants