Skip to content

Instantly share code, notes, and snippets.

View bmpercy's full-sized avatar

Brian Percival bmpercy

View GitHub Profile
@bmpercy
bmpercy / transactional_fixture_disabler.rb
Created February 22, 2012 04:51
Hack to disable transactional fixtures on a per-test basis in rails 3.2
module TransactionalFixtureDisabler
def self.included(klass)
klass.teardown :restore_transactional_fixture_status
end
# call this at the top of your test if you need to disable
# transactional fixtures. this might be the case if:
# - you're testing after_commit or after_rollback callbacks
# on models