class TestDotEdge
Tests for DOT::Edge
Public Instance Methods
test_0prop()
click to toggle source
# File test/rdot_test.rb, line 312 def test_0prop edge = DOT::Edge.new({ 'from' => 'a', 'to' => 'b' }) dot = edge.to_s assert_equal('a -- b', dot) end
test_1prop_0comma()
click to toggle source
# File test/rdot_test.rb, line 318 def test_1prop_0comma edge = DOT::Edge.new({ "label" => "the_label" }) dot = edge.to_s assert_no_match(dot, /,/) end
test_2prop_1comma()
click to toggle source
# File test/rdot_test.rb, line 324 def test_2prop_1comma edge = DOT::Edge.new({ "label" => "the_label", "weight" => "2" }) dot = edge.to_s assert_match(dot, /\[[^,]*,[^,]*\]/) end
test_no_label()
click to toggle source
# File test/rdot_test.rb, line 330 def test_no_label edge = DOT::Edge.new({ "weight" => "2" }) dot = edge.to_s assert_no_match(dot, /label/) end