test/graph_test.rb in rgl-0.5.1 vs test/graph_test.rb in rgl-0.5.2
- old
+ new
@@ -61,9 +61,14 @@
edges = @dg1.edges
@dg1.edgelist_class=Array
assert_equal edges, @dg1.edges
end
+ # Test for issue #22
+ def test_edges_to_s
+ assert_equal @dg1.edges.sort.to_s, "[(1-2), (1-6), (2-3), (2-4), (4-5), (6-4)]"
+ end
+
def test_not_implemented
graph = NotImplementedGraph.new
assert_raise(NotImplementedError) { graph.each_vertex }
assert_raise(NotImplementedError) { graph.each_adjacent(nil) }
end