class EventCollectionByDefaultTest

Public Instance Methods

setup() click to toggle source
# File test/unit/event_collection_test.rb, line 4
def setup
  @machine = StateMachine::Machine.new(Class.new)
  @events = StateMachine::EventCollection.new(@machine)
end
test_should_have_a_machine() click to toggle source
# File test/unit/event_collection_test.rb, line 13
def test_should_have_a_machine
  assert_equal @machine, @events.machine
end
test_should_not_have_any_nodes() click to toggle source
# File test/unit/event_collection_test.rb, line 9
def test_should_not_have_any_nodes
  assert_equal 0, @events.length
end
test_should_not_have_any_transitions_for_an_object() click to toggle source
# File test/unit/event_collection_test.rb, line 21
def test_should_not_have_any_transitions_for_an_object
  assert @events.transitions_for(@object).empty?
end
test_should_not_have_any_valid_events_for_an_object() click to toggle source
# File test/unit/event_collection_test.rb, line 17
def test_should_not_have_any_valid_events_for_an_object
  assert @events.valid_for(@object).empty?
end