Repository navigation
Reset ENV between specs with ice_age - #739
Merged
Merged
Conversation
Member
|
Nice. Here the LoC save is smaller, but the added value is real. |
Member
|
@dpep, final for merge? |
Contributor
Author
|
ready when you are @DannyBen ! as you said, not a huge LoC savings, but fixes a bug and removes some cognitive load / complexity (remembering to reset ENV) |
This file contains hidden or 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
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.
Same change as completely#106: add ice_age, which resets ENV after every example, and drop the manual ENV cleanup.
Two variables leak today:
BASHLY_TAB_INDENT:settings_spec.rbsaves the original inlet(:original_value), butletis lazy and only gets read in theafterhook, after the example has set the variable. So the "restore" writes back"anything at all", and it stays set for every later spec.BASHLY_SHELL:Commands::Shell#runsets it, andshell_spec.rbclears it by hand.Nothing fails yet, but a spec that reads either one would pass or fail depending on run order. ice_age closes both leaks and automates the cleanups.
spec_helperalready callsBundler.require :default, :development, so it's one Gemfile line plus deletions.