1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/tests/vcloud/models/compute/helper.rb
Paul Thornthwaite 2e0b7e545a Standardise empty lines throughout codebase
Done with `rubocop --auto-correct --only EmptyLineBetweenDefs,EmptyLines,EmptyLinesAroundBody`
2014-05-26 14:20:02 +01:00

22 lines
579 B
Ruby

class Vcloud
module Compute
module TestSupport
if Fog.mocking?
def self.template
'mock_template'
end
else
def self.template
template_name = ENV['VCLOUD_TEMPLATE']
raise "Specify VApp template name in VCLOUD_TEMPLATE env var" unless template_name
template_res = Vcloud.catalogs.item_by_name template_name
raise "URI Not found for specified template - check template name" unless template_res
template_res.href
end
end
end
module Formats
end
end
end