Skip to content

Instantly share code, notes, and snippets.

@wycats
Created October 21, 2008 18:47
Show Gist options
  • Save wycats/18382 to your computer and use it in GitHub Desktop.
Save wycats/18382 to your computer and use it in GitHub Desktop.
module YourApp
class ExampleGroup < Merb::Test::ExampleGroup
before(:each) do
@transaction = DataMapper::Transaction.new(repository(:default))
@transaction.begin
repository(:default).adapter.push_transaction(@transaction)
end
after(:each) do
repository(:default).adapter.pop_transaction
@transaction.rollback
end
Spec::Example::ExampleGroupFactory.default(self)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment