Sha256: 83849b674b50a1732a8dfd889a82abdff1fa1219e7fef3e6e7e40f7bb10ee016

Contents?: true

Size: 450 Bytes

Versions: 8

Compression:

Stored size: 450 Bytes

Contents

require 'database_cleaner'

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

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

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

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

  config.after(:each) do
    # Capybara.reset_sessions!
    DatabaseCleaner.clean
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
storytime-2.1.6 spec/support/database_cleaner.rb
storytime-2.1.5 spec/support/database_cleaner.rb
storytime-2.1.4 spec/support/database_cleaner.rb
storytime-2.1.3 spec/support/database_cleaner.rb
storytime-2.1.2 spec/support/database_cleaner.rb
storytime-2.1.1 spec/support/database_cleaner.rb
storytime-2.1.0 spec/support/database_cleaner.rb
storytime-2.0.0 spec/support/database_cleaner.rb