class MongoidTest::MachineByDefaultTest
Public Instance Methods
setup()
click to toggle source
# File test/unit/integrations/mongoid_test.rb, line 65 def setup @model = new_model @machine = StateMachine::Machine.new(@model) end
test_should_create_notifier_after_callback()
click to toggle source
# File test/unit/integrations/mongoid_test.rb, line 78 def test_should_create_notifier_after_callback assert_equal 1, @machine.callbacks[:after].size end
test_should_create_notifier_before_callback()
click to toggle source
# File test/unit/integrations/mongoid_test.rb, line 74 def test_should_create_notifier_before_callback assert_equal 1, @machine.callbacks[:before].size end
test_should_use_save_as_action()
click to toggle source
# File test/unit/integrations/mongoid_test.rb, line 70 def test_should_use_save_as_action assert_equal :save, @machine.action end