From e62b69fb1969ffcb8f921ee7842ad36913cd8dbf Mon Sep 17 00:00:00 2001 From: geemus Date: Fri, 2 Dec 2011 10:00:41 -0600 Subject: [PATCH] [vcloud|compute] stopgap fix for test data files stopgap for #638 --- tests/vcloud/models/compute/conn_helper.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/vcloud/models/compute/conn_helper.rb b/tests/vcloud/models/compute/conn_helper.rb index 93e551521..7c49e5ad2 100644 --- a/tests/vcloud/models/compute/conn_helper.rb +++ b/tests/vcloud/models/compute/conn_helper.rb @@ -4,8 +4,14 @@ module Fog end 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 => File.read(File.expand_path(File.join(File.dirname(__FILE__),'..','..','data',params[:path].gsub(/^\//,'').gsub('/','_+_')))), + :body => body, :status => 200, :header => '') end