Class: MachineCollectionFireImplicitWithActionErrorTest
- Inherits:
-
MachineCollectionFireImplicitTest
- Object
- Test::Unit::TestCase
- MachineCollectionFireImplicitTest
- MachineCollectionFireImplicitWithActionErrorTest
- Defined in:
- lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb
Instance Method Summary collapse
- #setup ⇒ Object
- #test_should_not_have_event_transition ⇒ Object
- #test_should_not_reset_event_attribute ⇒ Object
- #test_should_not_transition_state ⇒ Object
Methods inherited from MachineCollectionFireImplicitTest
Instance Method Details
#setup ⇒ Object
517 518 519 520 521 522 |
# File 'lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb', line 517 def setup super @object.state_event = 'ignite' assert_raise(ArgumentError) { @machines.fire_event_attributes(@object, :save) { raise ArgumentError } } end |
#test_should_not_have_event_transition ⇒ Object
532 533 534 |
# File 'lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb', line 532 def test_should_not_have_event_transition assert_nil @object.send(:state_event_transition) end |
#test_should_not_reset_event_attribute ⇒ Object
528 529 530 |
# File 'lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb', line 528 def test_should_not_reset_event_attribute assert_equal :ignite, @object.state_event end |
#test_should_not_transition_state ⇒ Object
524 525 526 |
# File 'lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb', line 524 def test_should_not_transition_state assert_equal 'parked', @object.state end |