Sha256: 8504266b45c13c055f5b625b708d46e409c82ca8c1cb7295a81300c6af543358

Contents?: true

Size: 774 Bytes

Versions: 3

Compression:

Stored size: 774 Bytes

Contents

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

describe "YARD::Handlers::Ruby::#{RUBY18 ? "Legacy::" : ""}ModuleHandler" do
  before do
    Registry.clear 
    parse_file :module_handler_001, __FILE__
  end

  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
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
yard-0.2.3.2 spec/handlers/module_handler_spec.rb
yard-0.2.3.3 spec/handlers/module_handler_spec.rb
yard-0.2.3 spec/handlers/module_handler_spec.rb