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

[rackspace|dns] fix mock init to play nice with tests

This commit is contained in:
geemus 2011-09-23 10:59:30 -05:00
parent 2c82662609
commit ae7294bdfd

View file

@ -38,7 +38,32 @@ module Fog
class Mock
def initialize(options={})
Fog::Mock.not_implemented
@rackspace_api_key = options[:rackspace_api_key]
@rackspace_username = options[:rackspace_username]
@rackspace_auth_url = options[:rackspace_auth_url]
@connection_options = options[:connection_options] || {}
end
def self.data
@data ||= {
:zones => {}
}
end
def self.reset
@data = nil
end
def auth_token
@auth_token ||= Fog::Dynect::Mock.token
end
def data
self.class.data
end
def reset_data
self.class.reset
end
end