sample spec_helper.rb
RSpec.configure do |config| | |
config.before(:suite) do | |
DatabaseCleaner.clean_with :truncation | |
DatabaseCleaner.strategy = :transaction | |
seed_db_with_lots_of_data # for example | |
end | |
config.before(:each) do | |
DatabaseCleaner.start | |
end | |
config.after(:each) do | |
DatabaseCleaner.clean | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment