summaryrefslogtreecommitdiffstats
path: root/spec/unit/interface/option_builder_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/interface/option_builder_spec.rb')
-rwxr-xr-xspec/unit/interface/option_builder_spec.rb14
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