[vcloud|compute] rather mock Fog::Vcloud::Connection as this is the right place to mock things
This commit is contained in:
parent
cfd96c6cc5
commit
f3d97623d4
|
@ -1,19 +1,17 @@
|
|||
module Fog
|
||||
module Vcloud
|
||||
class Compute < Fog::Service
|
||||
class Real
|
||||
def request(params, &block)
|
||||
path = File.expand_path(File.join(File.dirname(__FILE__),'..','..','data',params[:path].gsub(/^\//,'').gsub('/','_+_')))
|
||||
if File.exists?(path)
|
||||
body = File.read(path)
|
||||
else
|
||||
''
|
||||
end
|
||||
Excon::Response.new(
|
||||
:body => body,
|
||||
:status => 200,
|
||||
:header => '')
|
||||
class Fog::Connection
|
||||
def request(params, &block)
|
||||
path = File.expand_path(File.join(File.dirname(__FILE__),'..','..','data',params[:path].gsub(/^\//,'').gsub('/','_+_')))
|
||||
if File.exists?(path)
|
||||
body = File.read(path)
|
||||
else
|
||||
''
|
||||
end
|
||||
Excon::Response.new(
|
||||
:body => body,
|
||||
:status => 200,
|
||||
:header => '')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue