class MachineWithActionDefinedInClassTest
Public Instance Methods
save()
click to toggle source
# File test/unit/machine_test.rb, line 663 def save end
setup()
click to toggle source
# File test/unit/machine_test.rb, line 661 def setup @klass = Class.new do def save end end @machine = StateMachine::Machine.new(@klass, :action => :save) @object = @klass.new end
test_should_define_an_event_attribute_reader()
click to toggle source
# File test/unit/machine_test.rb, line 671 def test_should_define_an_event_attribute_reader assert @object.respond_to?(:state_event) end
test_should_define_an_event_attribute_writer()
click to toggle source
# File test/unit/machine_test.rb, line 675 def test_should_define_an_event_attribute_writer assert @object.respond_to?(:state_event=) end
test_should_define_an_event_transition_attribute_reader()
click to toggle source
# File test/unit/machine_test.rb, line 679 def test_should_define_an_event_transition_attribute_reader assert @object.respond_to?(:state_event_transition) end
test_should_define_an_event_transition_attribute_writer()
click to toggle source
# File test/unit/machine_test.rb, line 683 def test_should_define_an_event_transition_attribute_writer assert @object.respond_to?(:state_event_transition=) end
test_should_not_define_action()
click to toggle source
# File test/unit/machine_test.rb, line 687 def test_should_not_define_action assert !@klass.ancestors.any? {|ancestor| ancestor != @klass && ancestor.method_defined?(:save)} end
test_should_not_mark_action_hook_as_defined()
click to toggle source
# File test/unit/machine_test.rb, line 691 def test_should_not_mark_action_hook_as_defined assert !@machine.action_hook? end