class ActiveRecordTest::MachineWithoutTransactionsTest
Public Instance Methods
setup()
click to toggle source
# File test/unit/integrations/active_record_test.rb, line 758 def setup @model = new_model @machine = StateMachine::Machine.new(@model, :use_transactions => false) end
test_should_not_rollback_transaction_if_false()
click to toggle source
# File test/unit/integrations/active_record_test.rb, line 763 def test_should_not_rollback_transaction_if_false @machine.within_transaction(@model.new) do @model.create false end assert_equal 1, @model.count end
test_should_not_rollback_transaction_if_true()
click to toggle source
# File test/unit/integrations/active_record_test.rb, line 772 def test_should_not_rollback_transaction_if_true @machine.within_transaction(@model.new) do @model.create true end assert_equal 1, @model.count end