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 }
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" }
112
112
it "should do a quiet install" do
113
113
@provider.expects(:aptget).with { |*command| command.include?("-q") }
118
118
it "should default to 'yes' for all questions" do
119
119
@provider.expects(:aptget).with { |*command| command.include?("-y") }
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") }
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") }