Added SimpleCov, added tests for Vertex#to_s and Edge#to_s
[graph.njae.git] / spec / graph / vertex_spec.rb
index e091289557143377b6f5c7923e3f156b0350ebe0..33b9e0313ea4d360a8cfad9168f464fb2a2a29d7 100644 (file)
@@ -25,6 +25,14 @@ module GraphNjae
         v.score.should == 15
       end
     end # adds attributes
+
+    describe "#to_s" do
+      it "returns the string form of a vertex" do
+        v.name = :v1
+        v.to_s.should == '<V: v1>'
+      end
+    end
+
     
     describe "#<<" do
       it "adds a single edge between vertices" do