Sha256: fcb99e110bfce8214f87b68d27bf5cfc02d78a7e15d3f3578607dd2400b5f15a

Contents?: true

Size: 796 Bytes

Versions: 340

Compression:

Stored size: 796 Bytes

Contents

require 'spec_helper'
require 'puppet/interface'

class Puppet::Interface::TinyDocs::Test
  include Puppet::Interface::TinyDocs
  attr_accessor :name, :options, :display_global_options
  def initialize
    self.name    = "tinydoc-test"
    self.options = []
    self.display_global_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 { is_expected.to respond_to :build_synopsis }

    it "should put a space between options (#7828)" do
      expect(subject.build_synopsis('baz')).to match(/#{Regexp.quote('[--foo] [--bar]')}/)
    end
  end
end

Version data entries

340 entries across 340 versions & 1 rubygems

Version Path
puppet-7.20.0 spec/unit/interface/documentation_spec.rb
puppet-7.20.0-x86-mingw32 spec/unit/interface/documentation_spec.rb
puppet-7.20.0-x64-mingw32 spec/unit/interface/documentation_spec.rb
puppet-7.20.0-universal-darwin spec/unit/interface/documentation_spec.rb
puppet-7.19.0 spec/unit/interface/documentation_spec.rb
puppet-7.19.0-x86-mingw32 spec/unit/interface/documentation_spec.rb
puppet-7.19.0-x64-mingw32 spec/unit/interface/documentation_spec.rb
puppet-7.19.0-universal-darwin spec/unit/interface/documentation_spec.rb
puppet-7.18.0 spec/unit/interface/documentation_spec.rb
puppet-7.18.0-x86-mingw32 spec/unit/interface/documentation_spec.rb
puppet-7.18.0-x64-mingw32 spec/unit/interface/documentation_spec.rb
puppet-6.28.0 spec/unit/interface/documentation_spec.rb
puppet-7.18.0-universal-darwin spec/unit/interface/documentation_spec.rb
puppet-6.28.0-x86-mingw32 spec/unit/interface/documentation_spec.rb
puppet-6.28.0-x64-mingw32 spec/unit/interface/documentation_spec.rb
puppet-6.28.0-universal-darwin spec/unit/interface/documentation_spec.rb
puppet-7.17.0 spec/unit/interface/documentation_spec.rb
puppet-7.17.0-x86-mingw32 spec/unit/interface/documentation_spec.rb
puppet-7.17.0-x64-mingw32 spec/unit/interface/documentation_spec.rb
puppet-7.17.0-universal-darwin spec/unit/interface/documentation_spec.rb