[Pkg-puppet-devel] [facter] 95/352: Use the API to test resolution weight

Stig Sandbeck Mathisen ssm at debian.org
Sun Apr 6 22:21:35 UTC 2014


This is an automated email from the git hooks/post-receive script.

ssm pushed a commit to branch master
in repository facter.

commit 0dbfebd6439ee755273a5b3ba18f637e9e679dea
Author: Patrick Carlisle <patrick at puppetlabs.com>
Date:   Mon Dec 10 14:33:07 2012 -0800

    Use the API to test resolution weight
---
 spec/unit/util/fact_spec.rb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/spec/unit/util/fact_spec.rb b/spec/unit/util/fact_spec.rb
index 49a6d9f..166817e 100755
--- a/spec/unit/util/fact_spec.rb
+++ b/spec/unit/util/fact_spec.rb
@@ -48,9 +48,9 @@ describe Facter::Util::Fact do
     end
 
     it "should re-sort the resolutions by weight, so the most restricted resolutions are first" do
-      @fact.add { self.value = "1"; self.weight = 1 }
-      @fact.add { self.value = "2"; self.weight = 2 }
-      @fact.add { self.value = "0"; self.weight = 0 }
+      @fact.add { has_weight 1; setcode { "1" } }
+      @fact.add { has_weight 2; setcode { "2" } }
+      @fact.add { has_weight 0; setcode { "0" } }
       @fact.value.should == "2"
     end
   end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-puppet/facter.git



More information about the Pkg-puppet-devel mailing list