Sha256: fed2b75c763ba27ba9ea9e49ece7a608faec278d244bd91aa42481a52aff162f
Contents?: true
Size: 1.14 KB
Versions: 2
Compression:
Stored size: 1.14 KB
Contents
$:.unshift File.expand_path("../..", __FILE__) require 'spec_utils' require 'xmlsimple' require 'webmock' require 'webmock/rspec' require 'capistrano-payload' def fixture_path(file=nil) path = File.expand_path("../fixtures", __FILE__) path = File.join(path, file) unless file.nil? path end def fixture(file) File.read(File.join(fixture_path, file)) end def json_fixture(file) MultiJson.decode(fixture(file)) end def yaml_fixture(file) YAML.load(fixture(file)) end def xml_fixture(file) hash = XmlSimple.xml_in(fixture(file), 'ForceArray' => false, 'KeepRoot' => false) hash.recursive_symbolize_keys! hash end def xml_fixture_from_string(data) hash = XmlSimple.xml_in(data, 'ForceArray' => false, 'KeepRoot' => false) hash.recursive_symbolize_keys! hash end PAYLOAD = { :version => "2.6.0", :application => "foobar", :deployer => { :user => "username", :hostname => "localhost" }, :timestamp => Time.mktime(2011, 1, 1, 0, 0, 0), :source => { :branch => 'master', :revision => 'abcdef', :repository => 'git@github.com:username/repo.git' } }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
capistrano-payload-0.4.0 | spec/spec_helper.rb |
capistrano-payload-0.3.0 | spec/spec_helper.rb |