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

Add a reset method to Fog::Mock that resets all providers/services.

This commit is contained in:
anomalousthought 2011-05-17 22:41:35 -04:00
parent d0e428667e
commit 5fcf3185ca

View file

@ -63,6 +63,16 @@ module Fog
selection
end
def self.reset
providers = Fog.providers.map{|p| eval("Fog::#{p}")}
providers.select!{|m| m.constants.include?(:Compute)}
providers.each do |provider|
next unless provider::Compute::Mock.respond_to?(:reset)
provider::Compute::Mock.reset
end
end
end
end