Class: MachineCollectionFireImplicitWithNonBooleanResultTest
- Inherits:
-
MachineCollectionFireImplicitTest
- Object
- Test::Unit::TestCase
- MachineCollectionFireImplicitTest
- MachineCollectionFireImplicitWithNonBooleanResultTest
- Defined in:
- lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb
Instance Method Summary collapse
- #setup ⇒ Object
- #test_should_be_successful ⇒ Object
- #test_should_run_action ⇒ Object
- #test_should_transition_state ⇒ Object
Methods inherited from MachineCollectionFireImplicitTest
Instance Method Details
#setup ⇒ Object
466 467 468 469 470 471 472 473 474 475 476 |
# File 'lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb', line 466 def setup super @action_value = Object.new @object.state_event = 'ignite' @result = @machines.fire_event_attributes(@object, :save) do @saved = true @action_value end end |
#test_should_be_successful ⇒ Object
478 479 480 |
# File 'lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb', line 478 def test_should_be_successful assert_equal @action_value, @result end |
#test_should_run_action ⇒ Object
482 483 484 |
# File 'lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb', line 482 def test_should_run_action assert @saved end |
#test_should_transition_state ⇒ Object
486 487 488 |
# File 'lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb', line 486 def test_should_transition_state assert_equal 'idling', @object.state end |