[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:16:32 UTC 2011
The following commit has been merged in the experimental branch:
commit 22355dc01a7cab82427b43987f2bf542c281305c
Author: Daniel Pittman <daniel at puppetlabs.com>
Date: Mon Apr 18 15:25:19 2011 -0700
maint: test the 'help' face has the default action 'help'
We had a pending test for this, but forgot to write it way back when we were
implementing the feature. Add it now.
Reviewed-By: Max Martin <max at puppetlabs.com>
diff --git a/lib/puppet/interface/action.rb b/lib/puppet/interface/action.rb
index 412e394..efe7b1f 100644
--- a/lib/puppet/interface/action.rb
+++ b/lib/puppet/interface/action.rb
@@ -24,7 +24,12 @@ class Puppet::Interface::Action
attr_reader :name
def to_s() "#{@face}##{@name}" end
- attr_accessor :default, :summary
+ attr_accessor :default
+ def default?
+ !!@default
+ end
+
+ attr_accessor :summary
# Initially, this was defined to allow the @action.invoke pattern, which is
# a very natural way to invoke behaviour given our introspection
diff --git a/spec/unit/face/help_spec.rb b/spec/unit/face/help_spec.rb
index b5205af..faa5f96 100755
--- a/spec/unit/face/help_spec.rb
+++ b/spec/unit/face/help_spec.rb
@@ -7,7 +7,7 @@ describe Puppet::Face[:help, '0.0.1'] do
end
it "should have a default action of help" do
- pending "REVISIT: we don't support default actions yet"
+ subject.get_action('help').should be_default
end
it "should accept a call with no arguments" do
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list