~nvalcarcel/ubuntu/lucid/puppet/fix-546677

« back to all changes in this revision

Viewing changes to spec/unit/provider/package/apt.rb

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2009-12-23 00:48:10 UTC
  • mfrom: (1.1.10 upstream) (3.1.7 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091223004810-3i4oryds922g5n59
Tags: 0.25.1-3ubuntu1
* Merge from debian testing.  Remaining changes:
  - debian/rules:
    + Don't start puppet when first installing puppet.
  - debian/puppet.conf, lib/puppet/defaults.rb:
    + Move templates to /etc/puppet
  - lib/puppet/defaults.rb:
    + Fix /var/lib/puppet/state ownership.
  - man/man8/puppet.conf.8: 
    + Fix broken URL in manpage.
  - debian/control:
    + Update maintainer accordint to spec.
    + Puppetmaster Recommends -> Suggests
    + Created puppet-testsuite as a seperate. Allow the users to run puppet's 
      testsuite.
  - tests/Rakefile: Fix rakefile so that the testsuite can acutally be ran.

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
        it "should use 'apt-get install' with the package name if no version is asked for" do
99
99
            @resource.expects(:[]).with(:ensure).returns :installed
100
100
            @provider.expects(:aptget).with { |*command| command[-1] == "asdf" and command[-2] == :install }
101
 
            
 
101
 
102
102
            @provider.install
103
103
        end
104
104
 
105
105
        it "should specify the package version if one is asked for" do
106
106
            @resource.expects(:[]).with(:ensure).returns "1.0"
107
107
            @provider.expects(:aptget).with { |*command| command[-1] == "asdf=1.0" }
108
 
            
 
108
 
109
109
            @provider.install
110
110
        end
111
111
 
112
112
        it "should do a quiet install" do
113
113
            @provider.expects(:aptget).with { |*command| command.include?("-q") }
114
 
            
 
114
 
115
115
            @provider.install
116
116
        end
117
117
 
118
118
        it "should default to 'yes' for all questions" do
119
119
            @provider.expects(:aptget).with { |*command| command.include?("-y") }
120
 
            
 
120
 
121
121
            @provider.install
122
122
        end
123
123
 
124
124
        it "should keep config files if asked" do
125
125
            @resource.expects(:[]).with(:configfiles).returns :keep
126
126
            @provider.expects(:aptget).with { |*command| command.include?("DPkg::Options::=--force-confold") }
127
 
            
 
127
 
128
128
            @provider.install
129
129
        end
130
130
 
131
131
        it "should replace config files if asked" do
132
132
            @resource.expects(:[]).with(:configfiles).returns :replace
133
133
            @provider.expects(:aptget).with { |*command| command.include?("DPkg::Options::=--force-confnew") }
134
 
            
 
134
 
135
135
            @provider.install
136
136
        end
137
137
    end