Sha256: c0cb9e0f39cf57862442b344903b250474a116e2ef541aa5e5a256570ba9967a

Contents?: true

Size: 836 Bytes

Versions: 10

Compression:

Stored size: 836 Bytes

Contents

require 'active_record'
require 'arpa'
require 'database_cleaner'
require 'factory_girl'
require 'support/repositories/test_repository'
require 'i18n'

ActiveRecord::Base.establish_connection(adapter:  'sqlite3',
                                        database: "#{File.dirname(__FILE__)}/arpa.sqlite3")

load File.dirname(__FILE__) + '/support/schema.rb'

I18n.config.enforce_available_locales = true
I18n.load_path << File.expand_path('../../lib/config/locales/arpa.en.yml', __FILE__)
I18n.reload!

RSpec.configure do |config|

  config.include FactoryGirl::Syntax::Methods
  FactoryGirl.find_definitions

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

  config.around(:each) do |example|
    DatabaseCleaner.cleaning do
      example.run
    end
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
arpa-0.2.0 spec/spec_helper.rb
arpa-0.1.0 spec/spec_helper.rb
arpa-0.0.9 spec/spec_helper.rb
arpa-0.0.8 spec/spec_helper.rb
arpa-0.0.7 spec/spec_helper.rb
arpa-0.0.6 spec/spec_helper.rb
arpa-0.0.5 spec/spec_helper.rb
arpa-0.0.4 spec/spec_helper.rb
arpa-0.0.3 spec/spec_helper.rb
arpa-0.0.2 spec/spec_helper.rb