Class RR::Committers::NeverCommitter
In: lib/rubyrep/committers/committers.rb
Parent: DefaultCommitter

Starts a transaction but does never commit it. Useful during testing.

Methods

Public Class methods

Returns the last active data session

Saves the provided database session as class variable. Purpose: the last database session stays available after the NeverCommitter is destroyed so that also later the transaction rollback can still be executed.

Refer to DefaultCommitter#initialize for details. Starts new transactions on left and right database connectin of session. Additionally rolls back transactions started in previous NeverCommitter instances.

Rolls back transactions of current session (if there is one). This would be called e. g. in rspec‘s after(:each) to ensure that the next test case finds the original test data.

[Validate]