+
+ describe "#to_dot" do
+ it "describes an edge in dot notation" do
+ e << v1 << v2
+
+ e.to_dot.should == "#{v1.object_id.to_s} -- #{v2.object_id.to_s};"
+ end
+
+ it "describes an edge in dot notation, using given attributes" do
+ e << v1 << v2
+ #vdot = v1.to_dot :label => :name, :shape => :shape
+ #vdot.should == "#{v.object_id.to_s} {label = \"vertex\", shape = \"house\"};"
+ end
+
+
+ it "describes an edge in dot notation, given a block" do
+ e << v1 << v2
+
+ e.to_dot {|e| e.object_id.to_s}.should == e.object_id.to_s
+ end
+ end # dot