Skip to content

Instantly share code, notes, and snippets.

@usergenic
Created October 19, 2009 23:11
Show Gist options
  • Save usergenic/213816 to your computer and use it in GitHub Desktop.
Save usergenic/213816 to your computer and use it in GitHub Desktop.
Cucumber::Ast::Scenario.class_eval do
def accept_with_transactions(visitor)
repository.transaction.commit do |t|
accept_without_transactions(visitor)
t.rollback
end
end
alias_method :accept_without_transactions, :accept
alias_method :accept, :accept_with_transactions
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment