Sha256: ce933e14e71efc828a73ac1a8aee6e201d459133d3c6e69cb37ea63ee2acba8f

Contents?: true

Size: 782 Bytes

Versions: 35

Compression:

Stored size: 782 Bytes

Contents

#!/usr/bin/env rspec
require 'spec_helper'

require 'puppet/util/inline_docs'

class InlineDoccer
  include Puppet::Util::InlineDocs
end

describe Puppet::Util::InlineDocs do
  describe "when included" do
    it "should create a class method for specifying that docs should be associated" do
      InlineDoccer.expects(:use_docs=).with true
      InlineDoccer.associates_doc
    end

    it "should default to not associating docs" do
      (!! InlineDoccer.use_docs).should be_false
    end

    it "should create an instance method for setting documentation" do
      instance = InlineDoccer.new
      instance.doc = "foo"
      instance.doc.should == "foo"
    end

    it "should default to an empty string for docs" do
      InlineDoccer.new.doc.should == ""
    end
  end
end

Version data entries

35 entries across 35 versions & 3 rubygems

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