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:
parent
0f43707ab1
commit
d0e428667e
8 changed files with 32 additions and 0 deletions
|
@ -33,6 +33,10 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def self.reset
|
||||
@data = nil
|
||||
end
|
||||
|
||||
def initialize(options={})
|
||||
unless options.delete(:provider)
|
||||
location = caller.first
|
||||
|
|
|
@ -36,6 +36,10 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def self.reset
|
||||
@data = nil
|
||||
end
|
||||
|
||||
def initialize(options={})
|
||||
unless options.delete(:provider)
|
||||
location = caller.first
|
||||
|
|
|
@ -31,6 +31,10 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def self.reset
|
||||
@data = nil
|
||||
end
|
||||
|
||||
def initialize(options={})
|
||||
unless options.delete(:provider)
|
||||
location = caller.first
|
||||
|
|
|
@ -25,6 +25,10 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def self.reset
|
||||
@data = nil
|
||||
end
|
||||
|
||||
def initialize(options={})
|
||||
unless options.delete(:provider)
|
||||
location = caller.first
|
||||
|
|
|
@ -53,6 +53,10 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def self.reset
|
||||
@data = nil
|
||||
end
|
||||
|
||||
def initialize(options={})
|
||||
unless options.delete(:provider)
|
||||
location = caller.first
|
||||
|
|
|
@ -34,6 +34,10 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def self.reset
|
||||
@data = nil
|
||||
end
|
||||
|
||||
def initialize(options={})
|
||||
unless options.delete(:provider)
|
||||
location = caller.first
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue