Sha256: 405e901e5043e5a5cf70559f190dee2bd4af5d37cedd6e15613523e147b4608f

Contents?: true

Size: 1.31 KB

Versions: 20

Compression:

Stored size: 1.31 KB

Contents

RAILS_ENV = 'test'

# –––––––––––––
# Test Coverage
# –––––––––––––

if ENV['TRAVIS']
  require "codeclimate-test-reporter"
  CodeClimate::TestReporter.start
  allow_external_requests_to = Regexp.new(ENV['CODECLIMATE_API_HOST'].to_s)
else
  require 'simplecov'
  SimpleCov.start :rails do
    add_group 'Decorators',          'app/decorators'
    add_group 'Workers',             'app/workers'
    add_group 'Core Extensions',     'lib/extensions/core_extensions'
    add_group 'Rails Extensions',    'lib/extensions/rails_extensions'

    add_filter '/vendor'
    add_filter '/config/'
  end
end

# ––––––––––––
# Dependencies
# ––––––––––––

$LOAD_PATH.unshift File.expand_path('../support/models', __FILE__)

require 'gummi'

require 'db/person'
require 'db/rating'
require 'db/ship'

def setup_elastic
  Gummi::DbLayer::DefaultIndex.setup
  DB::Person.sync_mapping!
  DB::Rating.sync_mapping!
  DB::Ship.sync_mapping!
end

RSpec.configure do |config|
  config.before(:suite) do
    setup_elastic
  end

  config.before(:each, elastic: true) do
    setup_elastic
  end

  config.after(:each, elastic: true) do
    Gummi::DbLayer::DefaultIndex.teardown
  end
  config.after(:suite) do
    Gummi::DbLayer::DefaultIndex.teardown
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
gummi-0.3.16 spec/spec_helper.rb
gummi-1.0.3 spec/spec_helper.rb
gummi-1.0.2 spec/spec_helper.rb
gummi-1.0.0 spec/spec_helper.rb
gummi-0.3.14 spec/spec_helper.rb
gummi-0.3.13 spec/spec_helper.rb
gummi-0.3.12 spec/spec_helper.rb
gummi-0.3.11 spec/spec_helper.rb
gummi-0.3.10 spec/spec_helper.rb
gummi-0.3.9 spec/spec_helper.rb
gummi-0.3.8 spec/spec_helper.rb
gummi-0.3.7 spec/spec_helper.rb
gummi-0.3.6 spec/spec_helper.rb
gummi-0.3.5 spec/spec_helper.rb
gummi-0.3.4 spec/spec_helper.rb
gummi-0.3.3 spec/spec_helper.rb
gummi-0.3.2 spec/spec_helper.rb
gummi-0.3.1 spec/spec_helper.rb
gummi-0.3.0 spec/spec_helper.rb
gummi-0.2.3 spec/spec_helper.rb