Sha256: 890384e4b514b88638a84f22deff2eb766d5e4e3e7d4b831d0871eeccb795296
Contents?: true
Size: 887 Bytes
Versions: 3
Compression:
Stored size: 887 Bytes
Contents
require File.dirname(__FILE__) + '/spec_helper' describe YARD::CodeObjects::CodeObjectList do before { Registry.clear } it "pushing a value should only allow CodeObjects::Base, String or Symbol" do list = CodeObjectList.new(nil) lambda { list.push(:hash => 1) }.should raise_error(ArgumentError) list << "Test" list << :Test2 list << ModuleObject.new(nil, :YARD) list.size.should == 3 end it "added value should be a proxy if parameter was String or Symbol" do list = CodeObjectList.new(nil) list << "Test" list.first.class.should == Proxy end it "should contain a unique list of objects" do obj = ModuleObject.new(nil, :YARD) list = CodeObjectList.new(nil) list << P(:YARD) list << obj list.size.should == 1 list << :Test list << "Test" list.size.should == 2 end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
deg-yard-0.8.7.4 | spec/code_objects/code_object_list_spec.rb |
deg-yard-0.8.7.3 | spec/code_objects/code_object_list_spec.rb |
deg-yard-0.8.7.1 | spec/code_objects/code_object_list_spec.rb |