Last active
December 24, 2015 23:39
-
-
Save aquajach/6881985 to your computer and use it in GitHub Desktop.
Dynamic Database Cleaner Strategies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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