[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. debian/0.24.6-1-356-g5718585

Andrew Shafer andrew at reductivelabs.com
Fri Jan 23 14:20:58 UTC 2009


The following commit has been merged in the master branch:
commit 27f0c7d6e7bf3400ccecc6512d6a5d477cb9bea9
Author: Andrew Shafer <andrew at reductivelabs.com>
Date:   Sat Sep 20 22:00:19 2008 -0600

    fix failing hpux user specs
    
    feature 1508
    
    Not sure these tests ever passed on any platform. Added some mocking to support
    the two tests.

diff --git a/spec/unit/provider/user/hpux.rb b/spec/unit/provider/user/hpux.rb
index 8b31658..4129a7a 100755
--- a/spec/unit/provider/user/hpux.rb
+++ b/spec/unit/provider/user/hpux.rb
@@ -7,23 +7,19 @@ provider_class = Puppet::Type.type(:user).provider(:hpuxuseradd)
 describe provider_class do
     # left from the useradd test... I have no clue what I'm doing.
     before do
-        @resource = stub("resource", :name => "myuser", :managehome? => nil)
+        @resource = stub("resource", :name => "myuser", :managehome? => nil, :should => "fakeval", :[] => "fakeval")
         @provider = provider_class.new(@resource)
     end
 
     it "should add -F when modifying a user" do
-        @resource.stubs(:should).returns "fakeval"
-        @resource.stubs(:[]).returns "fakeval"
+        @resource.expects(:allowdupe?).returns true
         @provider.expects(:execute).with { |args| args.include?("-F") }
-
-        @provider.modify
+        @provider.uid = 1000
     end
 
     it "should add -F when deleting a user" do
-        @resource.stubs(:should).returns "fakeval"
-        @resource.stubs(:[]).returns "fakeval"
+        @provider.stubs(:exists?).returns(true)
         @provider.expects(:execute).with { |args| args.include?("-F") }
-
         @provider.delete
     end
 end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list