Sha256: 6ea94ef04008bf16339571c29e4e25a40608bc98ff00ca7b79fbdda5d8b350ed

Contents?: true

Size: 586 Bytes

Versions: 3

Compression:

Stored size: 586 Bytes

Contents

require "spec_helper"
require "active_record"
require "database_cleaner"
require "byebug"

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

# sqlite3 hates our mysql indexes
ActiveRecord::Migration.class_eval do
  def add_index *; end
end

DatabaseCleaner.strategy = :transaction
silence_stream(STDOUT) do
  load "spec/schema.rb"
end

RSpec.configure do |config|
  config.before(:each) do
    DatabaseCleaner.start
  end

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

# silence deprecation warning
I18n.enforce_available_locales = true

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
study_engine-0.1.1 spec/ar_helper.rb
study_engine-0.1.0 spec/ar_helper.rb
study_engine-0.0.2 spec/ar_helper.rb