Created
November 28, 2009 06:59
-
-
Save theconektd/244421 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def transactional_specs rspec_config | |
rspec_config.before do | |
@_spec_transaction = DataMapper::Transaction.new DataMapper.repository(:default).adapter | |
@_spec_transaction.begin | |
DataMapper.repository(:default).adapter.push_transaction @_spec_transaction | |
end | |
rspec_config.after do | |
DataMapper.repository(:default).adapter.pop_transaction | |
@_spec_transaction.rollback | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment