Sha256: 0f8d9343e3a72c0f6f5f4e92feb6ffe03e126e0cafa8967218263296babc6e1e
Contents?: true
Size: 683 Bytes
Versions: 2
Compression:
Stored size: 683 Bytes
Contents
require_relative 'test_helper' class MachineWithDirtyAttributeAndCustomAttributesDuringLoopbackTest < BaseTestCase def setup @model = new_model do connection.add_column table_name, :status, :string end @machine = StateMachines::Machine.new(@model, :status, :initial => :parked) @machine.event :park @record = @model.create @transition = StateMachines::Transition.new(@record, @machine, :park, :parked, :parked) @transition.perform(false) end def test_should_not_include_state_in_changed_attributes assert_equal [], @record.changed end def test_should_not_track_attribute_changes assert_nil @record.changes['status'] end end
Version data entries
2 entries across 2 versions & 1 rubygems