Class: MachineCollectionFireImplicitNestedPartialTest
- Inherits:
-
MachineCollectionFireImplicitTest
- Object
- Test::Unit::TestCase
- MachineCollectionFireImplicitTest
- MachineCollectionFireImplicitNestedPartialTest
- 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_have_successful_partial_fire ⇒ Object
- #test_should_reset_event_attribute ⇒ Object
- #test_should_reset_event_transition_attribute ⇒ Object
- #test_should_transition_state ⇒ Object
Methods inherited from MachineCollectionFireImplicitTest
Instance Method Details
#setup ⇒ Object
687 688 689 690 691 692 693 694 695 696 697 |
# File 'lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb', line 687 def setup super @partial_result = nil @object.state_event = 'ignite' @result = @machines.fire_event_attributes(@object, :save) do @partial_result = @machines.fire_event_attributes(@object, :save, false) { true } true end end |
#test_should_be_successful ⇒ Object
699 700 701 |
# File 'lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb', line 699 def test_should_be_successful assert @result end |
#test_should_have_successful_partial_fire ⇒ Object
703 704 705 |
# File 'lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb', line 703 def test_should_have_successful_partial_fire assert @partial_result end |
#test_should_reset_event_attribute ⇒ Object
711 712 713 |
# File 'lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb', line 711 def test_should_reset_event_attribute assert_nil @object.state_event end |
#test_should_reset_event_transition_attribute ⇒ Object
715 716 717 |
# File 'lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb', line 715 def test_should_reset_event_transition_attribute assert_nil @object.send(:state_event_transition) end |
#test_should_transition_state ⇒ Object
707 708 709 |
# File 'lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb', line 707 def test_should_transition_state assert_equal 'idling', @object.state end |