mirror of
https://github.com/fog/fog-aws.git
synced 2022-11-09 13:50:52 -05:00
ensure to put back mocking state to unmocked if it was real prior
This commit is contained in:
parent
4e0b572092
commit
84315d9d31
1 changed files with 2 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
Shindo.tests('AWS | credentials', ['aws']) do
|
||||
old_mock_value = Excon.defaults[:mock]
|
||||
fog_was_mocked = Fog.mocking?
|
||||
Excon.stubs.clear
|
||||
Fog.mock!
|
||||
begin
|
||||
|
@ -52,5 +53,6 @@ Shindo.tests('AWS | credentials', ['aws']) do
|
|||
ensure
|
||||
Excon.stubs.clear
|
||||
Excon.defaults[:mock] = old_mock_value
|
||||
Fog.unmock! if !fog_was_mocked
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue