diff options
| author | Daniel Pittman <daniel@puppetlabs.com> | 2011-04-17 19:20:49 -0700 |
|---|---|---|
| committer | Daniel Pittman <daniel@puppetlabs.com> | 2011-04-19 10:33:22 -0700 |
| commit | 266f937ed7d859fb2aee94c76e1a20539357c1eb (patch) | |
| tree | 575c9d0497fdc1e9fd629dd73573ef410c3ed388 /spec/unit/interface | |
| parent | 32c667c79bc0d5151580ea79719f28739945bfb1 (diff) | |
| download | puppet-266f937ed7d859fb2aee94c76e1a20539357c1eb.tar.gz puppet-266f937ed7d859fb2aee94c76e1a20539357c1eb.tar.xz puppet-266f937ed7d859fb2aee94c76e1a20539357c1eb.zip | |
(#6962) Add 'description' to faces and action.
This adds the 'description' method to the faces and actions, as well as
structured testing to ensure that the DSL works as expected.
Reviewed-By: Max Martin <max@puppetlabs.com>
Diffstat (limited to 'spec/unit/interface')
| -rwxr-xr-x | spec/unit/interface/action_spec.rb | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/spec/unit/interface/action_spec.rb b/spec/unit/interface/action_spec.rb index 602e51314..72f1cca73 100755 --- a/spec/unit/interface/action_spec.rb +++ b/spec/unit/interface/action_spec.rb @@ -349,31 +349,12 @@ describe Puppet::Interface::Action do end end - context "documentation" do + it_should_behave_like "documentation on faces" do subject do face = Puppet::Interface.new(:action_documentation, '0.0.1') do action :documentation do end end face.get_action(:documentation) end - - describe "#summary" do - it "should accept a summary" do - text = "this is my summary" - expect { subject.summary = text }.not_to raise_error - subject.summary.should == text - end - - it "should accept a long, long, long summary" do - text = "I never know when to stop with the word banana" + ("na" * 1000) - expect { subject.summary = text }.not_to raise_error - subject.summary.should == text - end - - it "should reject a summary with a newline" do - expect { subject.summary = "with\nnewlines" }. - to raise_error ArgumentError, /summary should be a single line/ - end - end end end |
