Sha256: f7114c22f2a260b18711bf44938ab29ff69a2cf61d605975b7e56c5613e8eba0

Contents?: true

Size: 1.13 KB

Versions: 9

Compression:

Stored size: 1.13 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_file "/var/www/bino"
        has_git_repo "git://git/repos/source.git", :to => "/var/www/source", :requires_user => "finger"
      end
      @compiled = ChefResolver.new(@tc.to_properties_hash).compile
    end
    it "should be a string" do
      @compiled.should =~ /execute/
    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_repo("git://source.git") do
            to "/var/www/xnot.org"
          end
        end
      end
      it "should have the path set within the resource" do
        ChefResolver.new(@tc.to_properties_hash).compile.should =~ /execute \"git-git:\/\/source\.git/
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
auser-poolparty-1.2.10 spec/poolparty/plugins/git_spec.rb
auser-poolparty-1.2.11 spec/poolparty/plugins/git_spec.rb
auser-poolparty-1.2.12 spec/poolparty/plugins/git_spec.rb
auser-poolparty-1.2.3 spec/poolparty/plugins/git_spec.rb
auser-poolparty-1.2.4 spec/poolparty/plugins/git_spec.rb
auser-poolparty-1.2.7 spec/poolparty/plugins/git_spec.rb
auser-poolparty-1.2.8 spec/poolparty/plugins/git_spec.rb
auser-poolparty-1.2.9 spec/poolparty/plugins/git_spec.rb
fairchild-poolparty-1.2.12 spec/poolparty/plugins/git_spec.rb