Sha256: 75776a34feb9a8f5fb33464c44e860376472849be98738a073d401d925f6b7fa
Contents?: true
Size: 877 Bytes
Versions: 7
Compression:
Stored size: 877 Bytes
Contents
require 'spec_helper' describe "the git deploy strategy" do subject do fixtures_dir = Pathname.new(__FILE__).dirname.join("fixtures") gitrepo_dir = tmpdir.join("gitrepo-#{Time.now.utc.strftime("%Y%m%d%H%M%S")}#{Time.now.tv_usec}-#{$$}") gitrepo_dir.mkdir system "tar xzf #{fixtures_dir.join('gitrepo.tar.gz')} --strip-components 1 -C #{gitrepo_dir}" EY::Serverside::Strategies::Git.new( test_shell, :repo => FIXTURES_DIR.join('repos','default'), :repository_cache => gitrepo_dir, :ref => "master" ) end before { subject.checkout } it "#checkout returns true for branches that exist" do subject.opts[:ref] = "somebranch" subject.checkout.should be_true end it "#checkout returns false for branches that do not exist" do subject.opts[:ref] = "notabranch" subject.checkout.should be_false end end
Version data entries
7 entries across 7 versions & 1 rubygems