Sha256: e0630fb084925ff062b1e8b9613833776fb21205f7f56f24a60dc80cbcd806d0

Contents?: true

Size: 801 Bytes

Versions: 79

Compression:

Stored size: 801 Bytes

Contents

#! /usr/bin/env ruby
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 { 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

79 entries across 79 versions & 1 rubygems

Version Path
puppet-3.8.1-x64-mingw32 spec/unit/interface/documentation_spec.rb
puppet-3.7.5 spec/unit/interface/documentation_spec.rb
puppet-3.7.5-x86-mingw32 spec/unit/interface/documentation_spec.rb
puppet-3.7.5-x64-mingw32 spec/unit/interface/documentation_spec.rb
puppet-3.7.4 spec/unit/interface/documentation_spec.rb
puppet-3.7.4-x86-mingw32 spec/unit/interface/documentation_spec.rb
puppet-3.7.4-x64-mingw32 spec/unit/interface/documentation_spec.rb
puppet-3.7.3 spec/unit/interface/documentation_spec.rb
puppet-3.7.3-x86-mingw32 spec/unit/interface/documentation_spec.rb
puppet-3.7.3-x64-mingw32 spec/unit/interface/documentation_spec.rb
puppet-3.7.2 spec/unit/interface/documentation_spec.rb
puppet-3.7.2-x86-mingw32 spec/unit/interface/documentation_spec.rb
puppet-3.7.2-x64-mingw32 spec/unit/interface/documentation_spec.rb
puppet-3.7.1 spec/unit/interface/documentation_spec.rb
puppet-3.7.1-x86-mingw32 spec/unit/interface/documentation_spec.rb
puppet-3.7.1-x64-mingw32 spec/unit/interface/documentation_spec.rb
puppet-3.7.0 spec/unit/interface/documentation_spec.rb
puppet-3.7.0-x86-mingw32 spec/unit/interface/documentation_spec.rb
puppet-3.7.0-x64-mingw32 spec/unit/interface/documentation_spec.rb
puppet-3.6.2 spec/unit/interface/documentation_spec.rb