Sha256: ae4179605c1eb9dbab34aff98f942f167024a85f1a5d1a1637f524ed529c18ab

Contents?: true

Size: 794 Bytes

Versions: 7

Compression:

Stored size: 794 Bytes

Contents

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'coveralls'
Coveralls.wear!

require 'byebug'
require 'pry-byebug'

require 'activemodel/associations'
ActiveModel::Associations::Hooks.init

ActiveRecord::Base.establish_connection(
  adapter: "sqlite3",
  database: ":memory:"
)

# Test Class
class User < ActiveRecord::Base; end

ActiveRecord::Migration.verbose = false
ActiveRecord::Migrator.migrate File.expand_path("../db/migrate", __FILE__), nil

require 'database_cleaner'

RSpec.configure do |config|
  config.order = :random

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

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

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
activemodel-associations-0.2.0 spec/spec_helper.rb
activemodel-associations-0.2.0.beta2 spec/spec_helper.rb
activemodel-associations-0.2.0.beta1 spec/spec_helper.rb
activemodel-associations-0.1.2 spec/spec_helper.rb
activemodel-associations-0.1.1 spec/spec_helper.rb
activemodel-associations-0.1.0 spec/spec_helper.rb
activemodel-associations-0.0.3 spec/spec_helper.rb