Sha256: 090b717f350d1db1bff87981c672553adefaf0f764513c1d33d0dd577b01be28

Contents?: true

Size: 1.49 KB

Versions: 15

Compression:

Stored size: 1.49 KB

Contents

#!/usr/bin/env rspec
require 'spec_helper'
require 'puppet/util/reference'

describe Puppet::Util::Reference do
  it "should create valid Markdown extension definition lists" do
    my_fragment = nil
    Puppet::Util::Reference.newreference :testreference, :doc => "A peer of the type and configuration references, but with no useful information" do
      my_term = "A term"
      my_definition = <<-EOT
        The definition of this term, marked by a colon and a space.
        We should be able to handle multi-line definitions. Each subsequent
        line should left-align with the first word character after the colon
        used as the definition marker.

        We should be able to handle multi-paragraph definitions.

        Leading indentation should be stripped from the definition, which allows
        us to indent the source string for cosmetic purposes.
      EOT
      my_fragment = markdown_definitionlist(my_term, my_definition)
    end
    Puppet::Util::Reference.reference(:testreference).send(:to_markdown, true)
    my_fragment.should == <<-EOT
A term
: The definition of this term, marked by a colon and a space.
  We should be able to handle multi-line definitions. Each subsequent
  line should left-align with the first word character after the colon
  used as the definition marker.

  We should be able to handle multi-paragraph definitions.

  Leading indentation should be stripped from the definition, which allows
  us to indent the source string for cosmetic purposes.

    EOT
  end

end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
puppet-2.7.26 spec/unit/util/reference_spec.rb
puppet-2.7.25 spec/unit/util/reference_spec.rb
puppet-2.7.24 spec/unit/util/reference_spec.rb
puppet-2.7.23 spec/unit/util/reference_spec.rb
puppet-2.7.22 spec/unit/util/reference_spec.rb
puppet-2.7.21 spec/unit/util/reference_spec.rb
puppet-2.7.20 spec/unit/util/reference_spec.rb
puppet-2.7.20.rc1 spec/unit/util/reference_spec.rb
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/puppet-2.7.18/spec/unit/util/reference_spec.rb
puppet-2.7.19 spec/unit/util/reference_spec.rb
librarian-puppet-0.9.3 vendor/gems/ruby/1.8/gems/puppet-2.7.18/spec/unit/util/reference_spec.rb
puppet-2.7.18 spec/unit/util/reference_spec.rb
puppet-2.7.17 spec/unit/util/reference_spec.rb
puppet-2.7.16 spec/unit/util/reference_spec.rb
puppet-2.7.14 spec/unit/util/reference_spec.rb