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

Add reset method to mock classes.

This commit is contained in:
anomalousthought 2011-05-17 22:40:17 -04:00
parent 0f43707ab1
commit d0e428667e
8 changed files with 32 additions and 0 deletions

View file

@ -33,6 +33,10 @@ module Fog
end
end
def self.reset
@data = nil
end
def initialize(options={})
unless options.delete(:provider)
location = caller.first

View file

@ -36,6 +36,10 @@ module Fog
end
end
def self.reset
@data = nil
end
def initialize(options={})
unless options.delete(:provider)
location = caller.first

View file

@ -31,6 +31,10 @@ module Fog
end
end
def self.reset
@data = nil
end
def initialize(options={})
unless options.delete(:provider)
location = caller.first

View file

@ -25,6 +25,10 @@ module Fog
end
end
def self.reset
@data = nil
end
def initialize(options={})
unless options.delete(:provider)
location = caller.first

View file

@ -53,6 +53,10 @@ module Fog
end
end
def self.reset
@data = nil
end
def initialize(options={})
unless options.delete(:provider)
location = caller.first

View file

@ -34,6 +34,10 @@ module Fog
end
end
def self.reset
@data = nil
end
def initialize(options={})
unless options.delete(:provider)
location = caller.first

View file

@ -56,6 +56,10 @@ module Fog
end
end
def self.reset
@data = nil
end
def self.reset_data(keys=data.keys)
for key in [*keys]
data.delete(key)

View file

@ -48,6 +48,10 @@ module Fog
end
end
def self.reset
@data = nil
end
def initialize(options={})
@voxel_api_key = options[:voxel_api_key]
@data = self.class.data[@voxel_api_key]