Sha256: 66a72b27cb4c122d6e59348c57a37f751215ad5f25c5180d7508281e27c35ad5

Contents?: true

Size: 1.07 KB

Versions: 19

Compression:

Stored size: 1.07 KB

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 "should render html format correctly" do
    html_equals(Registry.at('A').format(:format => :html, :no_highlight => true), :class001)
  end
  
  it "should render text format correctly" do
    text_equals(Registry.at('A').format, :class001)
  end

  it "should hide private constructors" do
    html_equals(Registry.at('D').format(:format => :html, :no_highlight => true, :verifier => Verifier.new("!@private")), :class002)
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
challah-0.6.2 vendor/bundle/gems/yard-0.7.5/spec/templates/class_spec.rb
challah-0.6.1 vendor/bundle/gems/yard-0.7.5/spec/templates/class_spec.rb
challah-0.6.0 vendor/bundle/gems/yard-0.7.5/spec/templates/class_spec.rb
challah-0.5.4 vendor/bundle/gems/yard-0.7.5/spec/templates/class_spec.rb
challah-0.5.3 vendor/bundle/gems/yard-0.7.5/spec/templates/class_spec.rb
challah-0.5.2 vendor/bundle/gems/yard-0.7.5/spec/templates/class_spec.rb
challah-0.5.1 vendor/bundle/gems/yard-0.7.5/spec/templates/class_spec.rb
challah-0.5.0 vendor/bundle/gems/yard-0.7.5/spec/templates/class_spec.rb
challah-0.4.1 vendor/bundle/gems/yard-0.7.5/spec/templates/class_spec.rb
challah-0.4.0 vendor/bundle/gems/yard-0.7.5/spec/templates/class_spec.rb
challah-0.3.5 vendor/bundle/gems/yard-0.7.5/spec/templates/class_spec.rb
challah-0.3.4 vendor/bundle/gems/yard-0.7.5/spec/templates/class_spec.rb
challah-0.3.3 vendor/bundle/gems/yard-0.7.5/spec/templates/class_spec.rb
challah-0.3.2 vendor/bundle/gems/yard-0.7.5/spec/templates/class_spec.rb
challah-0.3.1 vendor/bundle/gems/yard-0.7.5/spec/templates/class_spec.rb
challah-0.3.0 vendor/bundle/gems/yard-0.7.5/spec/templates/class_spec.rb
challah-0.2.1 vendor/bundle/gems/yard-0.7.5/spec/templates/class_spec.rb
challah-0.2.0 vendor/bundle/gems/yard-0.7.5/spec/templates/class_spec.rb
yard-0.7.5 spec/templates/class_spec.rb