Sha256: c5feeebc1b679046648478e13271b3e865bb4c207de3a6df6d55a03994c9b51d

Contents?: true

Size: 1004 Bytes

Versions: 8

Compression:

Stored size: 1004 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper'

describe YARD::Templates::Engine.template(:default, :docstring) do
  before do
    Registry.clear
    YARD.parse_string <<-'eof'
      private
      # Comments
      # @abstract override this class
      # @author Test
      # @version 1.0
      # @see A
      # @see http://example.com Example
      class A < B
        # HI
        def method_missing(*args) end
        # @deprecated
        def a; end

        # constructor method!
        def initialize(test) end
      end

      class C < A; end

      class D
        # @private
        def initialize; end
      end
    eof
  end

  it "renders html format correctly" do
    html_equals(Registry.at('A').format(html_options), :class001)
  end

  it "renders text format correctly" do
    text_equals(Registry.at('A').format, :class001)
  end

  it "hides private constructors" do
    html_equals(Registry.at('D').format(html_options(:verifier => Verifier.new("!@private"))), :class002)
  end
end

Version data entries

8 entries across 7 versions & 2 rubygems

Version Path
abaci-0.3.0 vendor/bundle/gems/yard-0.9.2/spec/templates/class_spec.rb
abaci-0.3.0 vendor/bundle/gems/yard-0.9.1/spec/templates/class_spec.rb
yard-0.9.5 spec/templates/class_spec.rb
yard-0.9.4 spec/templates/class_spec.rb
yard-0.9.3 spec/templates/class_spec.rb
yard-0.9.2 spec/templates/class_spec.rb
yard-0.9.1 spec/templates/class_spec.rb
yard-0.9.0 spec/templates/class_spec.rb