summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorDaniel Pittman <daniel@puppetlabs.com>2011-06-07 16:52:56 -0700
committerDaniel Pittman <daniel@puppetlabs.com>2011-06-07 16:52:56 -0700
commit54632867f7e2b97b47b0a6855196a52eb64ea92a (patch)
tree443b28b20b8b8b25f133c20853aaff41cc2c8c25 /spec
parentb4e9791df5c01183ff037a346361ed3667e67552 (diff)
parent0ae4732fd9058c2ae67f664c545dbd1846cef2df (diff)
downloadpuppet-54632867f7e2b97b47b0a6855196a52eb64ea92a.tar.gz
puppet-54632867f7e2b97b47b0a6855196a52eb64ea92a.tar.xz
puppet-54632867f7e2b97b47b0a6855196a52eb64ea92a.zip
Merge branch 'bug/2.7rc/7828-face-synopsis-generators-ram-options-together' into 2.7rc
Diffstat (limited to 'spec')
-rwxr-xr-xspec/unit/interface/documentation_spec.rb34
1 files changed, 34 insertions, 0 deletions
diff --git a/spec/unit/interface/documentation_spec.rb b/spec/unit/interface/documentation_spec.rb
new file mode 100755
index 000000000..6865b9073
--- /dev/null
+++ b/spec/unit/interface/documentation_spec.rb
@@ -0,0 +1,34 @@
+#!/usr/bin/env rspec
+require 'spec_helper'
+require 'puppet/interface'
+require 'puppet/interface/option'
+require 'puppet/interface/documentation'
+
+class Puppet::Interface::TinyDocs::Test
+ include Puppet::Interface::TinyDocs
+ attr_accessor :name, :options
+ def initialize
+ self.name = "tinydoc-test"
+ self.options = []
+ end
+
+ def get_option(name)
+ Puppet::Interface::Option.new(nil, "--#{name}")
+ end
+end
+
+describe Puppet::Interface::TinyDocs do
+ subject { Puppet::Interface::TinyDocs::Test.new }
+
+ context "#build_synopsis" do
+ before :each do
+ subject.options = [:foo, :bar]
+ end
+
+ it { should respond_to :build_synopsis }
+
+ it "should put a space between options (#7828)" do
+ subject.build_synopsis('baz').should =~ /#{Regexp.quote('[--foo] [--bar]')}/
+ end
+ end
+end