Sha256: 528c9a3ba3e4d8e0f3a5488121cace1da4f92dc0eb6513413ae1893e71b71bf6

Contents?: true

Size: 409 Bytes

Versions: 5

Compression:

Stored size: 409 Bytes

Contents

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

  config.before(:each) do
    if example.metadata[:js]
      DatabaseCleaner.strategy = :truncation
    else
      DatabaseCleaner.strategy = :transaction
      DatabaseCleaner.start
    end
  end

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
stationed-0.4.0 lib/stationed/generators/templates/database_cleaner.rb
stationed-0.3.0 lib/stationed/generators/templates/database_cleaner.rb
stationed-0.2.0 lib/stationed/generators/templates/database_cleaner.rb
stationed-0.1.0 lib/stationed/generators/templates/database_cleaner.rb
stationed-0.0.1 lib/stationed/generators/templates/database_cleaner.rb