Skip to content

Commit d25a628

Browse files
committed
Add ENV recovery after clearing during test run
It affects tests which execute `rails runner`
1 parent b43c196 commit d25a628

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

spec/config_env_spec.rb

+6
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,14 @@
1010
Config.load_files "#{fixture_path}/settings.yml", "#{fixture_path}/multilevel.yml"
1111
end
1212

13+
before :all do
14+
ENV_BACKUP = ENV.to_hash
15+
end
16+
1317
after :all do
1418
Config.use_env = false
19+
20+
ENV_BACKUP.each { |k, v| ENV[k] = v }
1521
end
1622

1723
before :each do

0 commit comments

Comments
 (0)