spec/handlers/module_handler_spec.rb in yard-0.6.4 vs spec/handlers/module_handler_spec.rb in yard-0.6.5
- old
+ new
@@ -1,8 +1,8 @@
require File.dirname(__FILE__) + '/spec_helper'
-describe "YARD::Handlers::Ruby::#{RUBY18 ? "Legacy::" : ""}ModuleHandler" do
+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
@@ -24,7 +24,11 @@
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
\ No newline at end of file