projects
/
graph.njae.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Added SimpleCov, added tests for Vertex#to_s and Edge#to_s
[graph.njae.git]
/
spec
/
graph
/
vertex_spec.rb
diff --git
a/spec/graph/vertex_spec.rb
b/spec/graph/vertex_spec.rb
index e091289557143377b6f5c7923e3f156b0350ebe0..33b9e0313ea4d360a8cfad9168f464fb2a2a29d7 100644
(file)
--- a/
spec/graph/vertex_spec.rb
+++ b/
spec/graph/vertex_spec.rb
@@
-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