Created
August 3, 2012 09:23
-
-
Save ciaranarcher/3246236 to your computer and use it in GitHub Desktop.
Rolling back all transactions during tests.
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
| # Always rollback transactions for all databases | |
| RSpec.configure do |c| | |
| c.around(:each) do |example| | |
| Sequel.transaction(SIASquirrel.databases.values, :rollback=>:always) { example.run } | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment