Sha256: 4076641ba22c2234fe7b6e5ac99e6baebfd4c9b7f31d599ad3f60cf2fd464068

Contents?: true

Size: 391 Bytes

Versions: 6

Compression:

Stored size: 391 Bytes

Contents

require "database_cleaner"

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

  config.before do
    DatabaseCleaner.strategy = :transaction
  end

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

  config.before do
    DatabaseCleaner.start
  end

  config.after do
    DatabaseCleaner.clean
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
craby-0.0.4 lib/craby/database_cleaner.rb
craby-0.0.3 lib/craby/database_cleaner.rb
craby-0.0.2 lib/craby/database_cleaner.rb
capy-spec-0.0.3 lib/capy_spec/database_cleaner.rb
capy-spec-0.0.2 lib/capy_spec/database_cleaner.rb
capy-spec-0.0.1 lib/capy_spec/database_cleaner.rb