Sha256: d7b28404294cb1e965371d9aadd440899b050a1f06b7e5b495d19b1e47756aa3
Contents?: true
Size: 814 Bytes
Versions: 5
Compression:
Stored size: 814 Bytes
Contents
DatabaseCleaner.clean_with(:truncation) # Remove/comment out the lines below if your app doesn't have a database. # For some databases (like MongoDB and CouchDB) you may need to use :truncation instead. begin DatabaseCleaner.strategy = :transaction rescue NameError raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it." end Before('@no-txn,@selenium,@culerity,@celerity') do DatabaseCleaner.strategy = :truncation, {:except => %w[widgets]} end Before('@webkit,@javascript,@js') do DatabaseCleaner.strategy = :transaction end After('@webkit,@javascript,@js') do DatabaseCleaner.clean_with(:truncation) end Before('~@no-txn', '~@selenium', '~@webkit', '~@culerity', '~@celerity', '~@javascript', '~@js') do DatabaseCleaner.strategy = :transaction end
Version data entries
5 entries across 5 versions & 1 rubygems