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.8.7 spec/support/database_cleaner.rb
krikri-0.8.6 spec/support/database_cleaner.rb
krikri-0.8.5 spec/support/database_cleaner.rb
krikri-0.8.4 spec/support/database_cleaner.rb
krikri-0.8.3 spec/support/database_cleaner.rb
krikri-0.8.2 spec/support/database_cleaner.rb
krikri-0.8.1 spec/support/database_cleaner.rb
krikri-0.8.0 spec/support/database_cleaner.rb
krikri-0.7.6 spec/support/database_cleaner.rb
krikri-0.7.5 spec/support/database_cleaner.rb
krikri-0.7.4 spec/support/database_cleaner.rb
krikri-0.7.3 spec/support/database_cleaner.rb
krikri-0.7.2 spec/support/database_cleaner.rb
krikri-0.7.1 spec/support/database_cleaner.rb
krikri-0.7.0 spec/support/database_cleaner.rb
krikri-0.6.0 spec/support/database_cleaner.rb
krikri-0.5.7 spec/support/database_cleaner.rb
krikri-0.5.6 spec/support/database_cleaner.rb
krikri-0.5.5 spec/support/database_cleaner.rb
krikri-0.5.4 spec/support/database_cleaner.rb