From 8631709d71833e68fbfe40dbee10fe876eb309ea Mon Sep 17 00:00:00 2001 From: Nick Lewis Date: Wed, 29 Dec 2010 17:24:58 -0800 Subject: (#5723) Fix failing type/package specs These tests were failing because they were overly constraining what the code could do. Because of a bug in Mocha 0.9.8, these failures weren't caught when the code causing them was first made. These failures were introduced in 7fff7808e25491a5ea1e207b8de3ade0c4f95f4f. Paired-With: Paul Berry --- spec/unit/type/package_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/unit/type/package_spec.rb b/spec/unit/type/package_spec.rb index b0c5d2252..662fe4798 100755 --- a/spec/unit/type/package_spec.rb +++ b/spec/unit/type/package_spec.rb @@ -121,7 +121,7 @@ describe Puppet::Type.type(:package) do before { @package[:ensure] = :purged } it "should do nothing if it is :purged" do - @provider.expects(:properties).returns(:ensure => :purged) + @provider.expects(:properties).returns(:ensure => :purged).at_least_once @catalog.apply end @@ -141,7 +141,7 @@ describe Puppet::Type.type(:package) do [:purged, :absent].each do |state| it "should do nothing if it is #{state.to_s}" do - @provider.expects(:properties).returns(:ensure => state) + @provider.expects(:properties).returns(:ensure => state).at_least_once @catalog.apply end end @@ -162,7 +162,7 @@ describe Puppet::Type.type(:package) do [:present, :latest, "1.0"].each do |state| it "should do nothing if it is #{state.to_s}" do - @provider.expects(:properties).returns(:ensure => state) + @provider.expects(:properties).returns(:ensure => state).at_least_once @catalog.apply end end -- cgit