X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=spec%2Ferd_handler%2Ferd_spec.rb;h=d6d5561e4cb34274d26b0e0fa4fda870ed2b3751;hb=042a27abb3ac3bf9faf36406204fe1d1901123d3;hp=0c32a815805b1c7afcd93be5809f4ac88b5ba8f8;hpb=5cb26987412346fc34cb344d7b169c0784f1da77;p=erd-marker.git diff --git a/spec/erd_handler/erd_spec.rb b/spec/erd_handler/erd_spec.rb index 0c32a81..d6d5561 100644 --- a/spec/erd_handler/erd_spec.rb +++ b/spec/erd_handler/erd_spec.rb @@ -79,56 +79,62 @@ module ErdHandler erd.should have(6).edges b0 = erd.vertices.find {|b| b.id == 0} - b0.name.should == "Unit" + b0.name.original.should == "Unit" b0.should have(2).neighbours b1 = erd.vertices.find {|b| b.id == 1} - b1.name.should == "Employee" + b1.name.original.should == "Employee" b1.should have(2).neighbours b2 = erd.vertices.find {|b| b.id == 2} - b2.name.should == "Course" + b2.name.original.should == "Course" b2.should have(3).neighbours b3 = erd.vertices.find {|b| b.id == 3} - b3.name.should == "Presentation" + b3.name.original.should == "Presentation" b3.should have(3).neighbours b4 = erd.vertices.find {|b| b.id == 4} - b4.name.should == "Client" + b4.name.original.should == "Client" b4.should have(1).neighbours l0 = erd.edges.find {|e| e.id == 0} + l0.name.original.should == "ConsistsOf" l0.connections.find {|c| c.end == b0}.blob.should be :closed l0.connections.find {|c| c.end == b0}.crowsfoot.should be :yes l0.connections.find {|c| c.end == b2}.blob.should be :closed l0.connections.find {|c| c.end == b2}.crowsfoot.should be :no l1 = erd.edges.find {|e| e.id == 1} + l1.name.original.should == "Prepares" l1.connections.find {|c| c.end == b0}.blob.should be :open l1.connections.find {|c| c.end == b0}.crowsfoot.should be :yes l1.connections.find {|c| c.end == b1}.blob.should be :closed l1.connections.find {|c| c.end == b1}.crowsfoot.should be :no l2 = erd.edges.find {|e| e.id == 2} + l2.name.original.should == "Presents" l2.connections.find {|c| c.end == b1}.blob.should be :closed l2.connections.find {|c| c.end == b1}.crowsfoot.should be :no l2.connections.find {|c| c.end == b3}.blob.should be :closed l2.connections.find {|c| c.end == b3}.crowsfoot.should be :yes l3 = erd.edges.find {|e| e.id == 3} + l3.name.original.should == "Presented" l3.connections.find {|c| c.end == b2}.blob.should be :open l3.connections.find {|c| c.end == b2}.crowsfoot.should be :no l3.connections.find {|c| c.end == b3}.blob.should be :closed l3.connections.find {|c| c.end == b3}.crowsfoot.should be :yes l4 = erd.edges.find {|e| e.id == 4} + l4.name.original.should == "Recieves" l4.connections.find {|c| c.end == b3}.blob.should be :closed l4.connections.find {|c| c.end == b3}.crowsfoot.should be :yes l4.connections.find {|c| c.end == b4}.blob.should be :closed l4.connections.find {|c| c.end == b4}.crowsfoot.should be :no l5 = erd.edges.find {|e| e.id == 5} + l5.name.original.should == "IsPrerequisiteOf" l5.connections.find {|c| c.crowsfoot == :yes}.blob.should be :open l5.connections.find {|c| c.crowsfoot == :no}.blob.should be :open l5.connections.find {|c| c.crowsfoot == :yes}.end.should be b2