summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorDaniel Pittman <daniel@puppetlabs.com>2011-04-11 15:50:24 -0700
committerDaniel Pittman <daniel@puppetlabs.com>2011-04-12 16:12:08 -0700
commitcdc5fec3640108ad01e0285b1039dae222590339 (patch)
tree60481f4f4388571a243a56af53ae8d48eb0dd605 /spec
parent91c29a72e2b728e2d9ba495cd34b7354faa3852b (diff)
downloadpuppet-cdc5fec3640108ad01e0285b1039dae222590339.tar.gz
puppet-cdc5fec3640108ad01e0285b1039dae222590339.tar.xz
puppet-cdc5fec3640108ad01e0285b1039dae222590339.zip
(#6962) Implement 'summary' for actions.
This extends the summary function down through the actions themselves, allowing us to display a useful summary to the user. Reviewed-By: Matt Robinson <matt@puppetlabs.com>
Diffstat (limited to 'spec')
-rwxr-xr-xspec/unit/interface/action_builder_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/unit/interface/action_builder_spec.rb b/spec/unit/interface/action_builder_spec.rb
index 7d2710942..666575605 100755
--- a/spec/unit/interface/action_builder_spec.rb
+++ b/spec/unit/interface/action_builder_spec.rb
@@ -55,5 +55,16 @@ describe Puppet::Interface::ActionBuilder do
action.should be_option :bar
end
end
+
+ context "inline documentation" do
+ let :face do Puppet::Interface.new(:inline_action_docs, '0.0.1') end
+
+ it "should set the summary" do
+ action = Puppet::Interface::ActionBuilder.build(face, :foo) do
+ summary "this is some text"
+ end
+ action.summary.should == "this is some text"
+ end
+ end
end
end