Sha256: 1322f09924afa5f9946388ec40e8fc1a4a1c17bffbd2a13bcef8ab46e8d11585

Contents?: true

Size: 398 Bytes

Versions: 2

Compression:

Stored size: 398 Bytes

Contents

RSpec.configure do |config|
  config.before(:suite) do
    DatabaseCleaner.clean_with(:truncation)
  end

  config.before(:each) do
    DatabaseCleaner.strategy = :transaction
  end

  config.before(:each, :js => true) do
    DatabaseCleaner.strategy = :truncation
  end

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_apps_testing-0.2.0 lib/generators/testing/configure/templates/database_cleaner.rb
rails_apps_testing-0.0.1 lib/generators/testing/configure/templates/database_cleaner.rb