Class: MachineCollectionFireImplicitWithCustomMachineNameTest
- Inherits:
-
MachineCollectionFireImplicitTest
- Object
- Test::Unit::TestCase
- MachineCollectionFireImplicitTest
- MachineCollectionFireImplicitWithCustomMachineNameTest
- Defined in:
- lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb
Instance Method Summary collapse
- #setup ⇒ Object
- #test_should_be_successful_on_complete_file ⇒ Object
- #test_should_be_successful_on_partial_fire ⇒ Object
Methods inherited from MachineCollectionFireImplicitTest
Instance Method Details
#setup ⇒ Object
844 845 846 847 848 |
# File 'lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb', line 844 def setup super @object.state_event = 'ignite' end |
#test_should_be_successful_on_complete_file ⇒ Object
850 851 852 853 854 855 |
# File 'lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb', line 850 def test_should_be_successful_on_complete_file assert @machines.fire_event_attributes(@object, :save) { true } assert_equal 'idling', @object.state assert_nil @object.state_event assert_nil @object.send(:state_event_transition) end |
#test_should_be_successful_on_partial_fire ⇒ Object
857 858 859 860 861 862 |
# File 'lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb', line 857 def test_should_be_successful_on_partial_fire @machines.fire_event_attributes(@object, :save, false) { true } assert_equal 'idling', @object.state assert_nil @object.state_event assert_not_nil @object.send(:state_event_transition) end |