class MongoMapperTest::MachineWithDirtyAttributesDuringLoopbackTest
Public Instance Methods
setup()
click to toggle source
# File test/unit/integrations/mongo_mapper_test.rb, line 577 def setup @model = new_model @machine = StateMachine::Machine.new(@model, :initial => :parked) @machine.event :park @record = @model.create @transition = StateMachine::Transition.new(@record, @machine, :park, :parked, :parked) @transition.perform(false) end
test_should_include_state_in_changed_attributes()
click to toggle source
# File test/unit/integrations/mongo_mapper_test.rb, line 588 def test_should_include_state_in_changed_attributes assert_equal %w(state), @record.changed end
test_should_track_attribute_changes()
click to toggle source
# File test/unit/integrations/mongo_mapper_test.rb, line 592 def test_should_track_attribute_changes assert_equal %w(parked parked), @record.changes['state'] end