class EventWithoutTransitionsTest

Public Instance Methods

setup() click to toggle source
# File test/unit/event_test.rb, line 432
def setup
  @klass = Class.new
  @machine = StateMachine::Machine.new(@klass)
  @machine.events << @event = StateMachine::Event.new(@machine, :ignite)
  @object = @klass.new
end
test_should_not_be_able_to_fire() click to toggle source
# File test/unit/event_test.rb, line 439
def test_should_not_be_able_to_fire
  assert !@event.can_fire?(@object)
end
test_should_not_change_the_current_state() click to toggle source
# File test/unit/event_test.rb, line 451
def test_should_not_change_the_current_state
  @event.fire(@object)
  assert_nil @object.state
end
test_should_not_fire() click to toggle source
# File test/unit/event_test.rb, line 447
def test_should_not_fire
  assert !@event.fire(@object)
end
test_should_not_have_a_transition() click to toggle source
# File test/unit/event_test.rb, line 443
def test_should_not_have_a_transition
  assert_nil @event.transition_for(@object)
end