spec/code_objects/proxy_spec.rb in yard-0.2.3.5 vs spec/code_objects/proxy_spec.rb in yard-0.4.0
- old
+ new
@@ -86,6 +86,15 @@
it "should never equal Registry.root" do
P("MYPROXY").should_not == Registry.root
P("X::A").should_not == Registry.root
end
+
+ it "should reset namespace and name when object is resolved" do
+ obj1 = ModuleObject.new(:root, :YARD)
+ obj2 = ModuleObject.new(:root, :NOTYARD)
+ resolved = Proxy.new(obj2, :YARD)
+ resolved.should == obj1
+ resolved.namespace.should == Registry.root
+ resolved.name.should == :YARD
+ end
end