Sha256: 7f00f85455f5d89e0ca2ba04a256640480e30d3cc20d071ffcc4101b3a6b31c3

Contents?: true

Size: 1.18 KB

Versions: 33

Compression:

Stored size: 1.18 KB

Contents

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

include PoolParty::Resources

class TestClass
  include PoolParty::Resources
end
describe "Remote Instance" do
  before(:each) do
    reset_resources!
  end
  describe "wrapped" do
    before(:each) do
      @tc = TestClass.new
    end
    it "should be a string" do
      @tc.has_git(:name => "gitrepos.git", :source => "git://source.git").to_string.should =~ /exec \{/
    end
    it "should included the flushed out options" do
      @tc.has_git({:name => "git.git", :source => "git://source.git", :user => "finger"}).to_string.should =~ /finger@git:/
    end
    it "should not include the user if none is given" do
      @tc.has_git({:name => "git.git", :source => "git://source.git"}).to_string.should =~ /git clone git:/
    end
    describe "in resource" do
      before(:each) do
        @tc.instance_eval do
          git(:name => "gittr") do
            source "git://source.git"
            path "/var/www/xnot.org"
            symlink "/var/www/xnot.org/public"
          end
        end
      end
      it "should have the path set within the resource" do
        @tc.resource(:git).first.to_string.should =~ /exec \{/
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
auser-poolparty-0.2.20 spec/poolparty/plugins/git_spec.rb
auser-poolparty-0.2.21 spec/poolparty/plugins/git_spec.rb
auser-poolparty-0.2.22 spec/poolparty/plugins/git_spec.rb
auser-poolparty-0.2.23 spec/poolparty/plugins/git_spec.rb
auser-poolparty-0.2.24 spec/poolparty/plugins/git_spec.rb
auser-poolparty-0.2.25 spec/poolparty/plugins/git_spec.rb
auser-poolparty-0.2.26 spec/poolparty/plugins/git_spec.rb
auser-poolparty-0.2.35 spec/poolparty/plugins/git_spec.rb
auser-poolparty-0.2.36 spec/poolparty/plugins/git_spec.rb
auser-poolparty-0.2.37 spec/poolparty/plugins/git_spec.rb
auser-poolparty-0.2.38 spec/poolparty/plugins/git_spec.rb
auser-poolparty-0.2.39 spec/poolparty/plugins/git_spec.rb
auser-poolparty-0.2.40 spec/poolparty/plugins/git_spec.rb
auser-poolparty-0.2.41 spec/poolparty/plugins/git_spec.rb
auser-poolparty-0.2.42 spec/poolparty/plugins/git_spec.rb
auser-poolparty-0.2.44 spec/poolparty/plugins/git_spec.rb
auser-poolparty-0.2.45 spec/poolparty/plugins/git_spec.rb
auser-poolparty-0.2.46 spec/poolparty/plugins/git_spec.rb
auser-poolparty-0.2.47 spec/poolparty/plugins/git_spec.rb
auser-poolparty-0.2.48 spec/poolparty/plugins/git_spec.rb