diff options
| author | Daniel Pittman <daniel@puppetlabs.com> | 2011-04-27 10:05:48 -0700 |
|---|---|---|
| committer | Daniel Pittman <daniel@puppetlabs.com> | 2011-04-27 10:10:20 -0700 |
| commit | e8eb290a1681baa19ef0b035af7cf17daadc6069 (patch) | |
| tree | e94d133c7a817be600fa38902fdc96cc304b3670 /spec/unit | |
| parent | 6e152ad1d0bb34f6d24fd818b2b020d5a8dd385b (diff) | |
| download | puppet-e8eb290a1681baa19ef0b035af7cf17daadc6069.tar.gz puppet-e8eb290a1681baa19ef0b035af7cf17daadc6069.tar.xz puppet-e8eb290a1681baa19ef0b035af7cf17daadc6069.zip | |
(#6962) Finish documentation API on Face options.
This extends the last of the documentation support, down into options, so they
can be described as expected. In the process we split out the modular docs
API into a full and short version options only want short docs, but the
behaviours are identical to the full version.
Diffstat (limited to 'spec/unit')
| -rwxr-xr-x | spec/unit/interface/option_builder_spec.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/spec/unit/interface/option_builder_spec.rb b/spec/unit/interface/option_builder_spec.rb index e9346852c..3e91c683b 100755 --- a/spec/unit/interface/option_builder_spec.rb +++ b/spec/unit/interface/option_builder_spec.rb @@ -16,13 +16,15 @@ describe Puppet::Interface::OptionBuilder do option.should be_an_instance_of Puppet::Interface::Option end - it "should support documentation declarations" do - text = "this is the description" - option = Puppet::Interface::OptionBuilder.build(face, "--foo") do - desc text + [:description, :summary].each do |doc| + it "should support #{doc} declarations" do + text = "this is the #{doc}" + option = Puppet::Interface::OptionBuilder.build(face, "--foo") do + self.send doc, text + end + option.should be_an_instance_of Puppet::Interface::Option + option.send(doc).should == text end - option.should be_an_instance_of Puppet::Interface::Option - option.desc.should == text end context "before_action hook" do |
