class TestDotDirectedEdge
Tests for DOT::DirectedEdge
Public Instance Methods
test_0prop()
click to toggle source
# File test/rdot_test.rb, line 340 def test_0prop edge = DOT::DirectedEdge.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 346 def test_1prop_0comma edge = DOT::DirectedEdge.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 352 def test_2prop_1comma edge = DOT::DirectedEdge.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 358 def test_no_label edge = DOT::DirectedEdge.new({ "weight" => "2" }) dot = edge.to_s assert_no_match(dot, /label/) end