Sha256: 782687019f3a2be2bc5d3687b1e2169f1c5ab448bce63e2d51d6434725ec972e

Contents?: true

Size: 401 Bytes

Versions: 1

Compression:

Stored size: 401 Bytes

Contents

# frozen_string_literal: true

begin
  require 'database_cleaner'

  Before('not @no-database-cleaner') do
    DatabaseCleaner.start if Cucumber::Rails::Database.autorun_database_cleaner
  end

  After('not @no-database-cleaner') do
    DatabaseCleaner.clean if Cucumber::Rails::Database.autorun_database_cleaner
  end
rescue LoadError
  Cucumber.logger.debug('database_cleaner gem not present.')
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cucumber-rails-2.1.0 lib/cucumber/rails/hooks/database_cleaner.rb