Don't report changed ENV caused by Bundler
Bundler's backups changes environment variables starting with BUNDLER_ORIG_. This causes a lot of noise in tests as the leakchecker reports them as changed.
This commit is contained in:
parent
367c072ac6
commit
6d83590157
@ -234,6 +234,9 @@ class LeakChecker
|
|||||||
new_env = find_env
|
new_env = find_env
|
||||||
return false if old_env == new_env
|
return false if old_env == new_env
|
||||||
(old_env.keys | new_env.keys).sort.each {|k|
|
(old_env.keys | new_env.keys).sort.each {|k|
|
||||||
|
# Don't report changed environment variables caused by Bundler's backups
|
||||||
|
next if k.start_with?(Bundler::EnvironmentPreserver::BUNDLER_PREFIX)
|
||||||
|
|
||||||
if old_env.has_key?(k)
|
if old_env.has_key?(k)
|
||||||
if new_env.has_key?(k)
|
if new_env.has_key?(k)
|
||||||
if old_env[k] != new_env[k]
|
if old_env[k] != new_env[k]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user