Sha256: 7413718a1005e1278c6f259bdf6ab76ba25dc2f06e50f518b2523598b5b4d165

Contents?: true

Size: 907 Bytes

Versions: 19

Compression:

Stored size: 907 Bytes

Contents

#!/usr/bin/env ruby

Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f) : Dir.chdir("..") { s.call(f) } }).call("spec/spec_helper.rb") }

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

19 entries across 19 versions & 1 rubygems

Version Path
puppet-2.6.18 spec/unit/util/inline_docs_spec.rb
puppet-2.6.17 spec/unit/util/inline_docs_spec.rb
puppet-2.6.16 spec/unit/util/inline_docs_spec.rb
puppet-2.6.15 spec/unit/util/inline_docs_spec.rb
puppet-2.6.14 spec/unit/util/inline_docs_spec.rb
puppet-2.6.13 spec/unit/util/inline_docs_spec.rb
puppet-2.6.12 spec/unit/util/inline_docs_spec.rb
puppet-2.6.11 spec/unit/util/inline_docs_spec.rb
puppet-2.6.10 spec/unit/util/inline_docs_spec.rb
puppet-2.6.9 spec/unit/util/inline_docs_spec.rb
puppet-2.6.8 spec/unit/util/inline_docs_spec.rb
puppet-2.6.7 spec/unit/util/inline_docs_spec.rb
puppet-2.6.6 spec/unit/util/inline_docs_spec.rb
puppet-2.6.5 spec/unit/util/inline_docs_spec.rb
puppet-2.6.4 spec/unit/util/inline_docs_spec.rb
puppet-2.6.3 spec/unit/util/inline_docs_spec.rb
puppet-2.6.2 spec/unit/util/inline_docs_spec.rb
puppet-2.6.1 spec/unit/util/inline_docs_spec.rb
puppet-2.6.0 spec/unit/util/inline_docs_spec.rb