Sha256: de92bb1f0f93cf285aaaf8d48d4cf18f505d63add4c8bb25e2dcb37ae6f6211e

Contents?: true

Size: 448 Bytes

Versions: 54

Compression:

Stored size: 448 Bytes

Contents

require 'database_cleaner'

RSpec.configure do |config|

  # clear database completely before test suite runs
  config.before(:suite) do
    DatabaseCleaner.clean_with(:truncation)
  end

  # set default database cleaning strategy to be transactions
  config.before(:each) do
    DatabaseCleaner.strategy = :transaction
  end

  config.before(:each) do
    DatabaseCleaner.start
  end

  config.after(:each) do
    DatabaseCleaner.clean
  end

end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
krikri-0.15.2 spec/support/database_cleaner.rb
krikri-0.15.1 spec/support/database_cleaner.rb
krikri-0.15.0 spec/support/database_cleaner.rb
krikri-0.14.0 spec/support/database_cleaner.rb
krikri-0.13.2 spec/support/database_cleaner.rb
krikri-0.13.1 spec/support/database_cleaner.rb
krikri-0.13.0 spec/support/database_cleaner.rb
krikri-0.12.4 spec/support/database_cleaner.rb
krikri-0.12.3 spec/support/database_cleaner.rb
krikri-0.12.1 spec/support/database_cleaner.rb
krikri-0.12.0 spec/support/database_cleaner.rb
krikri-0.12.0.pre.rc.1 spec/support/database_cleaner.rb
krikri-0.11.2 spec/support/database_cleaner.rb
krikri-0.11.1 spec/support/database_cleaner.rb
krikri-0.11.0 spec/support/database_cleaner.rb
krikri-0.10.1 spec/support/database_cleaner.rb
krikri-0.10.0 spec/support/database_cleaner.rb
krikri-0.9.0 spec/support/database_cleaner.rb
krikri-0.8.9 spec/support/database_cleaner.rb
krikri-0.8.8 spec/support/database_cleaner.rb