Sha256: 22428cb33c183728dc4687e614bf40440e83df8d78670f672ea434fbc0c7b910
Contents?: true
Size: 562 Bytes
Versions: 52
Compression:
Stored size: 562 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.append_after do DatabaseCleaner.clean end end
Version data entries
52 entries across 52 versions & 3 rubygems