Sha256: 00d52834892e0bec8e5def465229a63969d1359774f936eb3f04e20e2d8ab6f9

Contents?: true

Size: 630 Bytes

Versions: 10

Compression:

Stored size: 630 Bytes

Contents

require "coveralls"
Coveralls.wear!

require "active_record"
require "database_cleaner"

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

ActiveRecord::Migration.create_table :parents
ActiveRecord::Migration.create_table :children do |t|
  t.string :child_name
  t.references :parent
end

RSpec.configure do |config|
  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

  config.order = "random"
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
data_broker-0.5.0 spec/spec_helper.rb
data_broker-0.4.0 spec/spec_helper.rb
data_broker-0.3.0 spec/spec_helper.rb
data_broker-0.2.3 spec/spec_helper.rb
data_broker-0.2.2 spec/spec_helper.rb
data_broker-0.2.1 spec/spec_helper.rb
data_broker-0.2.0 spec/spec_helper.rb
data_broker-0.1.1 spec/spec_helper.rb
data_broker-0.1.0 spec/spec_helper.rb
data_broker-0.0.1 spec/spec_helper.rb