class StateDrawingInitialTest
Public Instance Methods
setup()
click to toggle source
# File test/unit/state_test.rb, line 852 def setup @machine = StateMachine::Machine.new(Class.new) @machine.states << @state = StateMachine::State.new(@machine, :parked, :initial => true) @machine.event :ignite do transition :parked => :idling end @graph = GraphViz.new('G') @node = @state.draw(@graph) end
test_should_draw_edge_between_point_and_state()
click to toggle source
# File test/unit/state_test.rb, line 867 def test_should_draw_edge_between_point_and_state assert_equal 2, @graph.node_count assert_equal 1, @graph.edge_count end
test_should_use_ellipse_as_shape()
click to toggle source
# File test/unit/state_test.rb, line 863 def test_should_use_ellipse_as_shape assert_equal 'ellipse', @node['shape'].to_s.gsub('"', '') end