Skip to content

Instantly share code, notes, and snippets.

@ciaranarcher
Created August 3, 2012 09:23
Show Gist options
  • Select an option

  • Save ciaranarcher/3246236 to your computer and use it in GitHub Desktop.

Select an option

Save ciaranarcher/3246236 to your computer and use it in GitHub Desktop.
Rolling back all transactions during tests.
# 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