Created
May 19, 2011 17:04
-
-
Save sdeming/981231 to your computer and use it in GitHub Desktop.
spec_helper.rb, patch for using transactions with Sequel
This file contains 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
class Spec::Example::ExampleGroup | |
def execute(*args, &block) | |
DB.transaction do | |
begin | |
super(*args, &block); | |
ensure | |
raise Sequel::Error::Rollback | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment