Sha256: 2ce865d5c6694cd9998d308945aeca24794d41fd2f9aa7241ada2cfbbeb3e9ec

Contents?: true

Size: 1.19 KB

Versions: 17

Compression:

Stored size: 1.19 KB

Contents

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

include PoolParty::Resources

describe "Remote file" do
  describe "instances" do
    before(:each) do
      @file = remotefile({:name => "/etc/apache2/puppetmaster.conf"})
    end
    it "should turn the one hash instance into a string" do
      @file.to_string.should =~ /"\/etc\/apache2\/puppetmaster\.conf":/
    end
    it "should turn the two hash instance into a string" do
      @file = file do
        name "/etc/init.d/puppetmaster"
        owner "redsmith"
      end
      @file.to_string.should =~ /"\/etc\/init\.d\/puppetmaster":/
    end
    describe "as included" do            
      before(:each) do
        @file = remotefile({:rent => "low"}) do
          name "/www/conf/httpd.conf"
        end
      end
      it "should have the source set to puppet" do
        @file.source.should == "puppet:///files/httpd.conf"
      end
      it "should use default values" do
        @file.name.should == "/www/conf/httpd.conf"
      end
      it "should keep the default values for the file" do
        @file.mode.should == 644
      end
      it "should also set options through a hash" do
        @file.rent.should == "low"
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
auser-poolparty-0.2.15 spec/poolparty/pool/resources/remote_file_spec.rb
auser-poolparty-0.2.16 spec/poolparty/pool/resources/remote_file_spec.rb
auser-poolparty-0.2.20 spec/poolparty/pool/resources/remote_file_spec.rb
auser-poolparty-0.2.21 spec/poolparty/pool/resources/remote_file_spec.rb
auser-poolparty-0.2.22 spec/poolparty/pool/resources/remote_file_spec.rb
auser-poolparty-0.2.23 spec/poolparty/pool/resources/remote_file_spec.rb
auser-poolparty-0.2.24 spec/poolparty/pool/resources/remote_file_spec.rb
auser-poolparty-0.2.25 spec/poolparty/pool/resources/remote_file_spec.rb
auser-poolparty-0.2.26 spec/poolparty/pool/resources/remote_file_spec.rb
auser-poolparty-0.2.3 spec/poolparty/pool/resources/remote_file_spec.rb
auser-poolparty-0.2.4 spec/poolparty/pool/resources/remote_file_spec.rb
auser-poolparty-0.2.5 spec/poolparty/pool/resources/remote_file_spec.rb
auser-poolparty-0.2.6 spec/poolparty/pool/resources/remote_file_spec.rb
auser-poolparty-0.2.8 spec/poolparty/pool/resources/remote_file_spec.rb
auser-poolparty-0.2.9 spec/poolparty/pool/resources/remote_file_spec.rb
poolparty-0.2.18 spec/poolparty/pool/resources/remote_file_spec.rb
poolparty-0.2.6 spec/poolparty/pool/resources/remote_file_spec.rb