3
require 'puppet/interface'
4
require 'puppet/interface/option'
5
require 'puppet/interface/documentation'
7
class Puppet::Interface::TinyDocs::Test
8
include Puppet::Interface::TinyDocs
9
attr_accessor :name, :options
11
self.name = "tinydoc-test"
16
Puppet::Interface::Option.new(nil, "--#{name}")
20
describe Puppet::Interface::TinyDocs do
21
subject { Puppet::Interface::TinyDocs::Test.new }
23
context "#build_synopsis" do
25
subject.options = [:foo, :bar]
28
it { should respond_to :build_synopsis }
30
it "should put a space between options (#7828)" do
31
subject.build_synopsis('baz').should =~ /#{Regexp.quote('[--foo] [--bar]')}/