X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=spec%2Fgraph%2Fvertex_spec.rb;h=ca9f7eb715687d7ee3ec69e16463c3f9327f4342;hb=1bd42608db15715f695d7dbaa95e6bf9429bcc2b;hp=9d109db3aced26dfdb072fdea7eed4ca9439985b;hpb=282a96d68535bd39b4dcd08ff805ccfcfd8b9f10;p=graph.njae.git diff --git a/spec/graph/vertex_spec.rb b/spec/graph/vertex_spec.rb index 9d109db..ca9f7eb 100644 --- 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 == '' + end + end + describe '#<<' do it 'adds a single edge between vertices' do