diff options
author | Daniel Pittman <daniel@puppetlabs.com> | 2011-04-18 15:25:19 -0700 |
---|---|---|
committer | Daniel Pittman <daniel@puppetlabs.com> | 2011-04-19 10:53:10 -0700 |
commit | 22355dc01a7cab82427b43987f2bf542c281305c (patch) | |
tree | b9e13fc179aca14e5802f6ca893688f0ead3939d /lib/puppet/interface/action.rb | |
parent | 5a100937d70d3a151153b958f92f3907d4547cd2 (diff) | |
download | puppet-22355dc01a7cab82427b43987f2bf542c281305c.tar.gz puppet-22355dc01a7cab82427b43987f2bf542c281305c.tar.xz puppet-22355dc01a7cab82427b43987f2bf542c281305c.zip |
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@puppetlabs.com>
Diffstat (limited to 'lib/puppet/interface/action.rb')
-rw-r--r-- | lib/puppet/interface/action.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/puppet/interface/action.rb b/lib/puppet/interface/action.rb index 412e39449..efe7b1f50 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 |