diff options
author | David Schmitt <david@dasz.at> | 2010-05-18 16:42:16 +0200 |
---|---|---|
committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
commit | d67f60fc164fce2ec53c0cde7ea9d9dbf665455a (patch) | |
tree | a6a994464f04616f8bcc04b4eefe5096f4ac4b5e | |
parent | e119b04f7738f5ffb6b9bf353bb28b3d058302a5 (diff) | |
download | puppet-d67f60fc164fce2ec53c0cde7ea9d9dbf665455a.tar.gz puppet-d67f60fc164fce2ec53c0cde7ea9d9dbf665455a.tar.xz puppet-d67f60fc164fce2ec53c0cde7ea9d9dbf665455a.zip |
Fix ProviderDpkg specs to avoid any real executions
-rwxr-xr-x | spec/unit/provider/package/dpkg.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/unit/provider/package/dpkg.rb b/spec/unit/provider/package/dpkg.rb index 7e3e8df43..d0c1d2622 100755 --- a/spec/unit/provider/package/dpkg.rb +++ b/spec/unit/provider/package/dpkg.rb @@ -8,6 +8,7 @@ describe provider do before do @resource = stub 'resource', :[] => "asdf" @provider = provider.new(@resource) + @provider.expects(:execute).never # forbid "manual" executions @fakeresult = "install ok installed asdf 1.0\n" end @@ -131,6 +132,7 @@ describe provider do it "should use 'dpkg -i' to install the package" do @resource.expects(:[]).with(:source).returns "mypackagefile" + @provider.expects(:unhold) @provider.expects(:dpkg).with { |*command| command[-1] == "mypackagefile" and command[-2] == "-i" } @provider.install @@ -138,6 +140,7 @@ describe provider do it "should keep old config files if told to do so" do @resource.expects(:[]).with(:configfiles).returns :keep + @provider.expects(:unhold) @provider.expects(:dpkg).with { |*command| command[0] == "--force-confold" } @provider.install @@ -145,6 +148,7 @@ describe provider do it "should replace old config files if told to do so" do @resource.expects(:[]).with(:configfiles).returns :replace + @provider.expects(:unhold) @provider.expects(:dpkg).with { |*command| command[0] == "--force-confnew" } @provider.install |