Sha256: 53634f90bcebad69128694086b70611950a9a93dd2afe1d0ccab496999a0933e
Contents?: true
Size: 1.4 KB
Versions: 19
Compression:
Stored size: 1.4 KB
Contents
require File.dirname(__FILE__) + '/spec_helper' describe YARD::Templates::Engine.template(:default, :tags) do before { Registry.clear } describe 'all known tags' do before do YARD.parse_string <<-'eof' # Comments # @abstract override me # @param [Hash] opts the options # @option opts :key ('') hello # @option opts :key2 (X) hello # @return [String] the result # @raise [Exception] Exception class # @deprecated for great justice # @see A # @see http://url.com # @see http://url.com Example # @author Name # @since 1.0 # @version 1.0 # @yield a block # @yieldparam [String] a a value # @yieldreturn [Hash] a hash # @example Wash your car # car.wash # @example To kill a mockingbird # a = String.new # flip(a.reverse) def m(opts = {}) end eof end it "should render text format correctly" do text_equals(Registry.at('#m').format, :tag001) end end describe 'param tags on non-methods' do it 'should not display @param tags on non-method objects' do YARD.parse_string <<-'eof' # @param [#to_s] name the name module Foo; end eof proc = lambda { Registry.at('Foo').format(:format => :html) } proc.should_not raise_error(NoMethodError) end end end
Version data entries
19 entries across 19 versions & 2 rubygems