Sha256: fd0edc2af412181312aa7090bf6d73dcda931d9e9880302296f1a988179411e7

Contents?: true

Size: 803 Bytes

Versions: 2

Compression:

Stored size: 803 Bytes

Contents

if ENV['START_SIMPLECOV'].to_i == 1
  require 'simplecov'
  SimpleCov.start do
    add_filter 'features'
  end
end

require 'acts_as_account'
require_relative 'db'

require 'database_cleaner'
require 'database_cleaner/cucumber'
DatabaseCleaner.strategy = :transaction

Dir["#{__dir__}/../step_definitions/*.rb"].sort.each { |file| require file }

require_relative 'user'
require_relative 'abstract_user'
require_relative 'inheriting_user'
require_relative 'cheque'

After do
  ActsAsAccount::Journal.clear_current
end

Before do
  ActsAsAccount.configure do |config|
    # Default values:
    # config.persist_attributes_on_account = true
  end
  if ENV['DATABASE_LOG'].to_i == 1 && ActiveRecord::Base.logger.nil?
    ActiveRecord::Base.logger = Logger.new(File.open("log/cucumber.log", 'a'))
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
acts_as_account-3.5.0 features/support/env.rb
acts_as_account-3.4.2 features/support/env.rb