Sha256: 825d7eae44ad22e92669e475ba3311553f86290ce6699dc33a26e09af4e8e250

Contents?: true

Size: 1.46 KB

Versions: 34

Compression:

Stored size: 1.46 KB

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../../../../test_helper')

describe ::Inch::Language::Ruby::Provider::YARD::NodocHelper do
  before do
    @config = Inch::Config.codebase
    @provider = ::Inch::Language::Ruby::Provider::YARD.parse(
      fixture_path(:ruby, :simple), @config)
    @objects = @provider.objects
  end

  it 'should return true for explicitly or implicitly tagged objects' do
    [
      'Foo::Qux',
      'Foo::Qux#method_with_implicit_nodoc',
      'Foo::Qux::Quux#method_with_private_tag',
      'Foo::Qux::Quux#method_with_explicit_nodoc',
      'Foo::Qux::Quux::PRIVATE_VALUE',
      'Foo::HiddenClass',
      'Foo::HiddenClass::EvenMoreHiddenClass',
      'Foo::HiddenClass::EvenMoreHiddenClass#method_with_implicit_nodoc',
      'Foo::HiddenClassViaTag',
      'Foo::HiddenClassViaTag#some_value'
    ].each do |query|
      m = @objects.find { |o| o.fullname == query }
      assert m.nodoc?, "nodoc? should return true for #{query}"
    end
  end

  it 'should return false for other objects' do
    [
      'Foo::Qux::Quux#method_without_nodoc',
      'Foo::Qux::Quux::PUBLIC_VALUE',
      'Foo::Qux::DOCCED_VALUE',
      'Foo::HiddenClass::EvenMoreHiddenClass::SuddenlyVisibleClass',
      'Foo::HiddenClass::EvenMoreHiddenClass::SuddenlyVisibleClass' \
        '#method_with_implicit_doc'
    ].each do |query|
      m = @objects.find { |o| o.fullname == query }
      refute m.nodoc?, "nodoc? should return false for #{query}"
    end
  end

end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
inch-0.9.0.rc1 test/unit/language/ruby/provider/yard/nodoc_helper_test.rb
inch-0.8.0 test/unit/language/ruby/provider/yard/nodoc_helper_test.rb
inch-0.8.0.rc2 test/unit/language/ruby/provider/yard/nodoc_helper_test.rb
inch-0.8.0.rc1 test/unit/language/ruby/provider/yard/nodoc_helper_test.rb
inch-0.7.1 test/unit/language/ruby/provider/yard/nodoc_helper_test.rb
inch-0.7.0 test/unit/language/ruby/provider/yard/nodoc_helper_test.rb
inch-0.6.4 test/unit/language/ruby/provider/yard/nodoc_helper_test.rb
inch-0.6.3 test/unit/language/ruby/provider/yard/nodoc_helper_test.rb
inch-0.6.2 test/unit/language/ruby/provider/yard/nodoc_helper_test.rb
inch-0.6.1 test/unit/language/ruby/provider/yard/nodoc_helper_test.rb
inch-0.6.0 test/unit/language/ruby/provider/yard/nodoc_helper_test.rb
inch-0.6.0.rc6 test/unit/language/ruby/provider/yard/nodoc_helper_test.rb
inch-0.6.0.rc5 test/unit/language/ruby/provider/yard/nodoc_helper_test.rb
inch-0.6.0.rc4 test/unit/language/ruby/provider/yard/nodoc_helper_test.rb
inch-0.6.0.rc3 test/unit/language/ruby/provider/yard/nodoc_helper_test.rb
inch-0.6.0.rc2 test/unit/language/ruby/provider/yard/nodoc_helper_test.rb
inch-0.6.0.rc1 test/unit/language/ruby/provider/yard/nodoc_helper_test.rb
inch-0.5.10 test/unit/language/ruby/provider/yard/nodoc_helper_test.rb
inch-0.5.9 test/unit/language/ruby/provider/yard/nodoc_helper_test.rb
inch-0.5.8 test/unit/language/ruby/provider/yard/nodoc_helper_test.rb