Sha256: 2ef19b24cd7d9ffca309c2984411d55b851a53d2dfe994b29db50286966233e8

Contents?: true

Size: 984 Bytes

Versions: 68

Compression:

Stored size: 984 Bytes

Contents

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

describe "YARD::Handlers::Ruby::#{LEGACY_PARSER ? "Legacy::" : ""}ModuleHandler" do
  before(:all) { parse_file :module_handler_001, __FILE__ }

  it "should parse a module block" do
    Registry.at(:ModName).should_not == nil
    Registry.at("ModName::OtherModName").should_not == nil
  end

  it "should attach docstring" do
    Registry.at("ModName::OtherModName").docstring.should == "Docstring"
  end

  it "should handle any formatting" do
    Registry.at(:StressTest).should_not == nil
  end

  it "should handle complex module names" do
    Registry.at("A::B").should_not == nil
  end

  it "should handle modules in the form ::ModName" do
    Registry.at("Kernel").should_not be_nil
  end

  it "should list mixins in proper order" do
    Registry.at('D').mixins.should == [P(:C), P(:B), P(:A)]
  end

  it "should create proper module when constant is in namespace" do
    Registry.at('Q::FOO::A').should_not be_nil
  end
end

Version data entries

68 entries across 52 versions & 7 rubygems

Version Path
yard-0.8.7.6 spec/handlers/module_handler_spec.rb
yard-0.8.7.5 spec/handlers/module_handler_spec.rb
climine-0.0.7 vendor/bundle/ruby/2.1.0/gems/yard-0.8.7.3/spec/handlers/module_handler_spec.rb
climine-0.0.7 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/spec/handlers/module_handler_spec.rb
climine-0.0.6 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/spec/handlers/module_handler_spec.rb
climine-0.0.5 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/spec/handlers/module_handler_spec.rb
yard-0.8.7.4 spec/handlers/module_handler_spec.rb
climine-0.0.4 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/spec/handlers/module_handler_spec.rb
climine-0.0.3 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/spec/handlers/module_handler_spec.rb
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/yard-0.8.7.3/spec/handlers/module_handler_spec.rb
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/yard-0.8.7.3/spec/handlers/module_handler_spec.rb
mango-0.7.0 vendor/bundler/ruby/2.0.0/gems/yard-0.8.7.3/spec/handlers/module_handler_spec.rb
climine-0.0.2 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/spec/handlers/module_handler_spec.rb
climine-0.0.1 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/spec/handlers/module_handler_spec.rb
yard-0.8.7.3 spec/handlers/module_handler_spec.rb
yard-0.8.7.2 spec/handlers/module_handler_spec.rb
candlepin-api-0.4.0 bundle/ruby/1.8/gems/yard-0.8.7/spec/handlers/module_handler_spec.rb
candlepin-api-0.4.0 bundle/ruby/gems/yard-0.8.7/spec/handlers/module_handler_spec.rb
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/yard-0.8.7/spec/handlers/module_handler_spec.rb
yard-0.8.7.1 spec/handlers/module_handler_spec.rb