Skip to content

Instantly share code, notes, and snippets.

@aquajach
Last active December 24, 2015 23:39
Show Gist options
  • Save aquajach/6881985 to your computer and use it in GitHub Desktop.
Save aquajach/6881985 to your computer and use it in GitHub Desktop.
Dynamic Database Cleaner Strategies
RSpec.configure do |config|
config.before do
DatabaseCleaner.strategy = :transaction
end
config.before(:each, :feature => true) do
DatabaseCleaner.strategy = :deletion # or :truncation
end
end
# spec/features/something_spec.rb
require 'spec_helper'
describe BigProcessor do
it '......', feature: true do
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment