Sha256: 9b1571e711c0a9d31f650a56ebf51f313419842348de7c34427062c70178cb4e

Contents?: true

Size: 1.02 KB

Versions: 10

Compression:

Stored size: 1.02 KB

Contents

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

describe YARD::Templates::Helpers::TextHelper do
  include YARD::Templates::Helpers::TextHelper
  include YARD::Templates::Helpers::MethodHelper
  
  describe '#signature' do
    before do
      @results = {
        :regular => "root.foo -> Object",
        :default_return => "root.foo -> Hello",
        :no_default_return => "root.foo",
        :private_class => "A.foo -> Object (private)",
        :single => "root.foo -> String",
        :two_types => "root.foo -> (String, Symbol)",
        :two_types_multitag => "root.foo -> (String, Symbol)",
        :type_nil => "root.foo -> Type?",
        :type_array => "root.foo -> Type+",
        :multitype => "root.foo -> (Type, ...)",
        :void => "root.foo -> void",
        :hide_void => "root.foo",
        :block => "root.foo {|a, b, c| ... } -> Object"
      }
    end
    
    def signature(obj) super(obj).strip end
    
    it_should_behave_like "signature"
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
yard-0.5.8 spec/templates/helpers/text_helper_spec.rb
yard-0.5.7 spec/templates/helpers/text_helper_spec.rb
yard-0.5.6 spec/templates/helpers/text_helper_spec.rb
yard-0.5.5 spec/templates/helpers/text_helper_spec.rb
yard-0.5.4 spec/templates/helpers/text_helper_spec.rb
yard-0.5.3 spec/templates/helpers/text_helper_spec.rb
yard-0.5.2 spec/templates/helpers/text_helper_spec.rb
yard-0.5.1p1 spec/templates/helpers/text_helper_spec.rb
yard-0.5.1 spec/templates/helpers/text_helper_spec.rb
yard-0.5.0 spec/templates/helpers/text_helper_spec.rb