Sha256: f082c2a276403ba7b6c4c5c82447f56b56c2fe5a23841724d855929fd30d2cc3

Contents?: true

Size: 1.23 KB

Versions: 10

Compression:

Stored size: 1.23 KB

Contents

require File.dirname(__FILE__) + '/../spec_helper'

class TestGitClass < PoolParty::Cloud::Cloud
end

describe "Remote Instance" do
  describe "wrapped" do
    before(:each) do
      reset!
      @tc = cloud :test_git_class_cloud do
        has_git_repos :at => "/var/www/", :name => "gitrepos.git", :source => "git://git/repos/source.git", :requires_user => "finger"
      end
      @compiled = PuppetResolver.new(@tc.to_properties_hash).compile
    end
    it "should be a string" do
      @compiled.should =~ /exec/
    end
    it "should included the flushed out options" do
      @compiled.should =~ /finger@git:/
    end
    it "should not include the user if none is given" do
      @compiled.should =~ /git clone finger@git:/
    end
    describe "in resource" do
      before(:each) do
        @tc = cloud :test_git_class_cloud_two do
          has_git_repos(:name => "gittr") do
            symlink "/var/www/xnot.org/public"
            source "git://source.git"
            path "/var/www/xnot.org"       
            at "/var/www"
          end
        end
      end
      it "should have the path set within the resource" do
        PuppetResolver.new(@tc.to_properties_hash).compile.should =~ /exec \{ \"git-gittr/
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
auser-poolparty-1.1.1 spec/poolparty/plugins/git_spec.rb
auser-poolparty-1.1.3 spec/poolparty/plugins/git_spec.rb
auser-poolparty-1.1.4 spec/poolparty/plugins/git_spec.rb
auser-poolparty-1.1.5 spec/poolparty/plugins/git_spec.rb
auser-poolparty-1.1.6 spec/poolparty/plugins/git_spec.rb
auser-poolparty-1.1.7 spec/poolparty/plugins/git_spec.rb
auser-poolparty-1.2.0 spec/poolparty/plugins/git_spec.rb
fairchild-poolparty-1.1.3 spec/poolparty/plugins/git_spec.rb
fairchild-poolparty-1.1.4 spec/poolparty/plugins/git_spec.rb
fairchild-poolparty-1.1.5 spec/poolparty/plugins/git_spec.rb