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

[vsphere] Use Fog.mock? as the other providers

Specs can set Fog.mock! without setting the env var
This commit is contained in:
Carlos Sanchez 2013-04-22 14:17:46 +02:00
parent 0e686b2740
commit 35be017b03

View file

@ -18,7 +18,7 @@ module Fog
raise ArgumentError, "#{required_options.join(', ')} are required" unless options.has_key? param
end
# TODO This is ugly and needs to rethink mocks
unless ENV['FOG_MOCK']
unless Fog.mock?
raise ArgumentError, "#{options["datacenter"]} Doesn't Exist!" unless get_datacenter(options["datacenter"])
raise ArgumentError, "#{options["template_path"]} Doesn't Exist!" unless get_virtual_machine(options["template_path"], options["datacenter"])
end