-
Notifications
You must be signed in to change notification settings - Fork 369
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
Fix symbol configuration for env
and service
#2864
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Just a few suggestions :)
Codecov Report
@@ Coverage Diff @@
## master #2864 +/- ##
=======================================
Coverage 98.08% 98.09%
=======================================
Files 1269 1270 +1
Lines 69963 70017 +54
Branches 3160 3163 +3
=======================================
+ Hits 68624 68683 +59
+ Misses 1339 1334 -5
... and 5 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
it do | ||
input = 'a_string' | ||
context 'when given a string' do | ||
it 'returns a duplicate' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
returns a non frozen dupliacte
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few extra suggestions, but overall LGTM 👍, thanks for this!
expect(result).to eq(input) | ||
expect(result).to equal(input) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: This can be simplified a bit, because we only need to check #equal?
, as that's the one that tests the object references and should never be overridden.
Rspec has a nice alias for equal that I like to use in these situations:
expect(result).to eq(input) | |
expect(result).to equal(input) | |
expect(result).to be(input) |
result = described_class.frozen_or_dup(input) | ||
|
||
expect(result).to eq(input) | ||
expect(result).not_to equal(input) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: Suggestion to match my other suggestion above
expect(result).not_to equal(input) | |
expect(result).not_to be(input) |
expect(result).to eq(input) | ||
expect(result).to equal(input) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: Suggestion to match my other suggestion above
expect(result).to eq(input) | |
expect(result).to equal(input) | |
expect(result).to be(input) |
expect(result).to eq(input) | ||
expect(result).not_to equal(input) | ||
expect(result).not_to be_frozen | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: May be worth adding here a test that validates that the input string is not frozen in the process.
(And the same for #frozen_dup
below)
result = described_class.frozen_dup(input) | ||
|
||
expect(result).to eq(input) | ||
expect(result).not_to equal(input) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: Suggestion to match my other suggestion above
expect(result).not_to equal(input) | |
expect(result).not_to be(input) |
What does this PR do?
env
andservice
configuration backward compatible for symbolSafeDup