Sha256: 3e0d11fdf4a69b5987894567f6084daf99282f4507a7ec5af0bae9410df5ffb1

Contents?: true

Size: 996 Bytes

Versions: 34

Compression:

Stored size: 996 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

34 entries across 34 versions & 4 rubygems

Version Path
challah-0.6.2 vendor/bundle/gems/yard-0.7.5/spec/handlers/module_handler_spec.rb
challah-0.6.1 vendor/bundle/gems/yard-0.7.5/spec/handlers/module_handler_spec.rb
challah-0.6.0 vendor/bundle/gems/yard-0.7.5/spec/handlers/module_handler_spec.rb
challah-0.5.4 vendor/bundle/gems/yard-0.7.5/spec/handlers/module_handler_spec.rb
challah-0.5.3 vendor/bundle/gems/yard-0.7.5/spec/handlers/module_handler_spec.rb
challah-0.5.2 vendor/bundle/gems/yard-0.7.5/spec/handlers/module_handler_spec.rb
challah-0.5.1 vendor/bundle/gems/yard-0.7.5/spec/handlers/module_handler_spec.rb
challah-0.5.0 vendor/bundle/gems/yard-0.7.5/spec/handlers/module_handler_spec.rb
challah-0.4.1 vendor/bundle/gems/yard-0.7.5/spec/handlers/module_handler_spec.rb
challah-0.4.0 vendor/bundle/gems/yard-0.7.5/spec/handlers/module_handler_spec.rb
challah-0.3.5 vendor/bundle/gems/yard-0.7.5/spec/handlers/module_handler_spec.rb
challah-0.3.4 vendor/bundle/gems/yard-0.7.5/spec/handlers/module_handler_spec.rb
challah-0.3.3 vendor/bundle/gems/yard-0.7.5/spec/handlers/module_handler_spec.rb
challah-0.3.2 vendor/bundle/gems/yard-0.7.5/spec/handlers/module_handler_spec.rb
challah-0.3.1 vendor/bundle/gems/yard-0.7.5/spec/handlers/module_handler_spec.rb
challah-0.3.0 vendor/bundle/gems/yard-0.7.5/spec/handlers/module_handler_spec.rb
challah-0.2.1 vendor/bundle/gems/yard-0.7.5/spec/handlers/module_handler_spec.rb
challah-0.2.0 vendor/bundle/gems/yard-0.7.5/spec/handlers/module_handler_spec.rb
yard-0.7.5 spec/handlers/module_handler_spec.rb
nutshell-crm-0.0.6.alpha vendor/bundle/gems/yard-0.7.4/spec/handlers/module_handler_spec.rb