[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5

Daniel Pittman daniel at puppetlabs.com
Tue May 10 08:10:53 UTC 2011


The following commit has been merged in the experimental branch:
commit 75ef3af26fcd205f316358b2f23abe5e200f6eaf
Author: Daniel Pittman <daniel at puppetlabs.com>
Date:   Mon Apr 4 13:52:59 2011 -0700

    maint: added testing to ensure we inherit options correctly.

diff --git a/spec/unit/string/action_spec.rb b/spec/unit/string/action_spec.rb
index e5fefdb..1d25ff1 100755
--- a/spec/unit/string/action_spec.rb
+++ b/spec/unit/string/action_spec.rb
@@ -121,6 +121,22 @@ describe Puppet::String::Action do
         string.get_action(:foo).options.should =~ [:bar, :quux]
       end
 
+      it "should fetch options that the string inherited" do
+        parent = Class.new(Puppet::String)
+        parent.option "--foo"
+        child = parent.new(:inherited_options, '0.0.1') do
+          option "--bar"
+          action :action do option "--baz" end
+        end
+
+        action = child.get_action(:action)
+        action.should be
+
+        [:baz, :bar, :foo].each do |name|
+          action.get_option(name).should be_an_instance_of Puppet::String::Option
+        end
+      end
+
       it "should get an action option when asked" do
         string.get_action(:foo).get_option(:bar).
           should be_an_instance_of Puppet::String::Option

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list