-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
houndci-bot
reviewed
Sep 25, 2019
b1f6aac
to
a49a8ab
Compare
a49a8ab
to
4cc082e
Compare
4cc082e
to
383b996
Compare
383b996
to
3fd0a14
Compare
3fd0a14
to
cfd4eac
Compare
cfd4eac
to
ba20faf
Compare
ba20faf
to
4d38479
Compare
4d38479
to
830ceb3
Compare
830ceb3
to
04a980a
Compare
04a980a
to
1c92f32
Compare
1c92f32
to
b287b44
Compare
b287b44
to
5dcde8d
Compare
5dcde8d
to
b885610
Compare
a9e0669
to
009f8e9
Compare
009f8e9
to
f9dd018
Compare
f9dd018
to
acfa20a
Compare
acfa20a
to
dd1ebdd
Compare
dd1ebdd
to
19a395a
Compare
19a395a
to
11ba662
Compare
11ba662
to
15568ca
Compare
4965814
to
c6808c9
Compare
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.
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objectives