Sha256: a6b08436ab502a5e3a13f88d659e15ee6adac1e44ee832eb0798bb378acdb6da

Contents?: true

Size: 852 Bytes

Versions: 6

Compression:

Stored size: 852 Bytes

Contents

require 'spec_helper'

describe "the git deploy strategy" do
  subject do
    fixtures_dir = Pathname.new(__FILE__).dirname.join("fixtures")
    gitrepo_dir = Pathname.new(Dir.tmpdir).join("gitrepo-#{Time.now.to_i}-#{$$}")
    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

6 entries across 6 versions & 1 rubygems

Version Path
engineyard-serverside-2.0.0.pre5 spec/git_strategy_spec.rb
engineyard-serverside-2.0.0.pre4 spec/git_strategy_spec.rb
engineyard-serverside-2.0.0.pre3 spec/git_strategy_spec.rb
engineyard-serverside-2.0.0.pre2 spec/git_strategy_spec.rb
engineyard-serverside-2.0.0.pre1 spec/git_strategy_spec.rb
engineyard-serverside-1.7.0.pre2 spec/git_strategy_spec.rb