Sha256: 94f6c374d81984aad77777bad2e8b4ead31cbde95b10d0d5e00340f29980c2c3

Contents?: true

Size: 814 Bytes

Versions: 35

Compression:

Stored size: 814 Bytes

Contents

#!/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

Version data entries

35 entries across 35 versions & 3 rubygems

Version Path
puppet-2.7.26 spec/unit/interface/documentation_spec.rb
puppet-2.7.25 spec/unit/interface/documentation_spec.rb
puppet-2.7.24 spec/unit/interface/documentation_spec.rb
puppet-2.7.23 spec/unit/interface/documentation_spec.rb
puppet-2.7.22 spec/unit/interface/documentation_spec.rb
puppet-2.7.21 spec/unit/interface/documentation_spec.rb
puppet-2.7.20 spec/unit/interface/documentation_spec.rb
puppet-2.7.20.rc1 spec/unit/interface/documentation_spec.rb
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/puppet-2.7.18/spec/unit/interface/documentation_spec.rb
puppet-2.7.19 spec/unit/interface/documentation_spec.rb
supply_drop-0.11.0 examples/vendored-puppet/vendor/puppet-2.7.8/spec/unit/interface/documentation_spec.rb
librarian-puppet-0.9.3 vendor/gems/ruby/1.8/gems/puppet-2.7.18/spec/unit/interface/documentation_spec.rb
supply_drop-0.10.2 examples/vendored-puppet/vendor/puppet-2.7.8/spec/unit/interface/documentation_spec.rb
puppet-2.7.18 spec/unit/interface/documentation_spec.rb
supply_drop-0.10.1 examples/vendored-puppet/vendor/puppet-2.7.8/spec/unit/interface/documentation_spec.rb
supply_drop-0.10.0 examples/vendored-puppet/vendor/puppet-2.7.8/spec/unit/interface/documentation_spec.rb
puppet-2.7.17 spec/unit/interface/documentation_spec.rb
puppet-2.7.16 spec/unit/interface/documentation_spec.rb
puppet-2.7.14 spec/unit/interface/documentation_spec.rb
puppet-2.7.13 spec/unit/interface/documentation_spec.rb