Sha256: 6832ec311c20ffb133598dddc090b858ed12ed098cb51aa9669ffadbe1e8f5a1

Contents?: true

Size: 707 Bytes

Versions: 1

Compression:

Stored size: 707 Bytes

Contents

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'active_support/all'
require 'active_support/testing/time_helpers'
require 'factory_girl'
require 'database_cleaner'
require 'active_hash'
require 'sqlite3'
require_relative 'factories/factories'

Bundler.require(:default, :development)

ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => ':memory:')

RSpec.configure do |config|

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

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

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

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

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
data_works-0.1.1 spec/spec_helper.rb