Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dcvezzani/5313095 to your computer and use it in GitHub Desktop.
Save dcvezzani/5313095 to your computer and use it in GitHub Desktop.
I know this won't work for *all* tests, but for now, this works. There must be a very good reason for default truncation for all @javascript. I keep having to add exceptions to the list (the next one would have been the users table), I we'll see how far this goes.
Before('@no-txn,@selenium,@culerity,@celerity') do
# I added this block and changed to transaction because @javascript was truncating most of my tables
#DatabaseCleaner.strategy = :truncation, {:except => %w[groups]}
DatabaseCleaner.strategy = :truncation
end
Before('@javascript') do
#DatabaseCleaner.strategy = :truncation, {:except => %w[groups categories category_types content_types content_type_groups bcms_my401k_layouts]}
DatabaseCleaner.strategy = :transaction
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment