Sha256: 349718d2bfd8af34dc7bd36461b541bd13ab211fb91b55353d594f490f7bebde

Contents?: true

Size: 657 Bytes

Versions: 6

Compression:

Stored size: 657 Bytes

Contents

require 'active_record'

ActiveRecord::Base.establish_connection adapter: 'postgresql', database: 'sample_filter_test'
ActiveRecord::Migration.maintain_test_schema!
ActiveRecord::Migration.create_table :entities, force: true do |t|
  t.string :title
  t.integer :amount
  t.datetime :created_at
  t.string :status
  t.integer :kind
  t.boolean :confirmed
end

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

6 entries across 6 versions & 1 rubygems

Version Path
sample_filter-0.1.7 spec/ar_helper.rb
sample_filter-0.1.6 spec/ar_helper.rb
sample_filter-0.1.5 spec/ar_helper.rb
sample_filter-0.1.4 spec/ar_helper.rb
sample_filter-0.1.3 spec/ar_helper.rb
sample_filter-0.1.2 spec/ar_helper.rb