Sha256: 00ec6fbd5745bfce230c603587ca2c72011b1bc2aec1ba7a0d2709eb1f13d5b8

Contents?: true

Size: 854 Bytes

Versions: 1

Compression:

Stored size: 854 Bytes

Contents

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

describe YARD::Handlers::MixinHandler do
  before { parse_file :mixin_handler_001, __FILE__ }
  
  it "should handle includes from classes or modules" do
    Registry.at(:X).mixins.should include(P(:A))
    Registry.at(:Y).mixins.should include(P(:A))
  end
  
  it "should handle includes for complex namespaces" do
  end
  
  it "should handle includes for modules that don't yet exist" do
    Registry.at(:X).mixins.should include(P(nil, :NOTEXIST))
  end
  
  it "should set the type of non-existing modules to :module" do
    P(:NOTEXIST).type.should == :module
  end
  
  it "should handle includes with multiple parameters" do
    Registry.at(:X)
  end
  
  it "should handle complex include statements" do
    P(:Y).mixins.should include(P('B::C'))
    P(:Y).mixins.should include(P(:B))
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
yard-0.2.2 spec/handlers/mixin_handler_spec.rb