1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[core] make sure credentials tests properly reset after completion

This commit is contained in:
geemus 2011-09-23 16:31:18 -05:00
parent 804d348d26
commit 7ac7bbe3af

View file

@ -1,16 +1,12 @@
Shindo.tests do
before do
@old_home = ENV['HOME']
@old_rc = ENV['FOG_RC']
@old_credential = ENV['FOG_CREDENTIAL']
@old_credentials = Fog.credentials
Fog.instance_variable_set('@credential_path', nil) # kill memoization
Fog.instance_variable_set('@credential', nil) # kill memoization
end
after do
ENV['HOME'] = @old_home
ENV['FOG_RC'] = @old_rc
ENV['FOG_CREDENTIAL'] = @old_credential
Fog.credentials = @old_credentials
end
tests('credential') do