Skip to content

Commit 27520c9

Browse files
committed
[Rails51] Ensure clean Rails env. Pass /test_establish_connection_using_3_levels_config/
1 parent b7084aa commit 27520c9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/cases/helper_sqlserver.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,14 @@ class TestCase < ActiveSupport::TestCase
2323

2424
let(:logger) { ActiveRecord::Base.logger }
2525

26+
setup :ensure_clean_rails_env
2627

2728
private
2829

30+
def ensure_clean_rails_env
31+
Rails.instance_variable_set(:@_env, nil) if defined?(::Rails)
32+
end
33+
2934
def host_windows?
3035
RbConfig::CONFIG['host_os'] =~ /mswin|mingw/
3136
end

0 commit comments

Comments
 (0)