Sha256: aab45622b55e182aa52c39a41fbf53ec33c99d211313b20a4dc1ee1e13f4a7a8
Contents?: true
Size: 555 Bytes
Versions: 36
Compression:
Stored size: 555 Bytes
Contents
require 'database_cleaner' RSpec.configure do |config| config.before(:suite) do DatabaseCleaner.clean_with :truncation end config.before do DatabaseCleaner.strategy = :transaction end # Before each spec check if it is a Javascript test and switch between using database transactions or not where necessary. config.before(:each, :js) do DatabaseCleaner.strategy = :truncation end config.before do DatabaseCleaner.start end # After each spec clean the database. config.after do DatabaseCleaner.clean end end
Version data entries
36 entries across 36 versions & 2 rubygems