Sha256: 6d663372d620e0000accb111cd42d30a054338bed2ce1697054b655fbf2d2806

Contents?: true

Size: 1.51 KB

Versions: 25

Compression:

Stored size: 1.51 KB

Contents

if ENV['COVERAGE'] == 'yes'
  require 'simplecov'
  SimpleCov.start
end

require 'codeclimate-test-reporter'
CodeClimate::TestReporter.start

ENV['RAILS_ENV'] ||= 'test'

require 'engine_cart'
EngineCart.load_application!

require 'rspec/rails'
require 'webmock/rspec'
require 'factory_girl_rails'

require 'dpla/map/factories'
require 'audumbla/spec/enrichment'
require 'rdf/marmotta'

require 'devise'

Rails.backtrace_cleaner.remove_silencers!

# Load support files
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }

WebMock.disable_net_connect!(:allow_localhost => true)

RSpec.configure do |config|
  config.color = true
  config.formatter = :progress
  config.mock_with :rspec

  config.include FactoryGirl::Syntax::Methods

  # These are for ensuring that controller tests are authenticated:
  config.include Devise::TestHelpers, type: :controller
  config.extend ControllerMacros, type: :controller

  # use_transactional_fixtures is false to comply with database cleaner configs
  config.use_transactional_fixtures = false
  config.infer_base_class_for_anonymous_controllers = false
  config.order = 'random'

  def clear_repository
    Krikri::Repository.clear!
  end

  def clear_search_index
    indexer = Krikri::QASearchIndex.new
    indexer.delete_by_query(['*:*'])
    indexer.commit
  end

  config.before(:suite) do
    clear_repository
    clear_search_index
  end

  config.after(:suite) do
    clear_repository
    clear_search_index
    WebMock.disable_net_connect!(:allow => 'codeclimate.com')
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
krikri-0.12.0 spec/spec_helper.rb
krikri-0.12.0.pre.rc.1 spec/spec_helper.rb
krikri-0.11.2 spec/spec_helper.rb
krikri-0.11.1 spec/spec_helper.rb
krikri-0.11.0 spec/spec_helper.rb
krikri-0.10.1 spec/spec_helper.rb
krikri-0.10.0 spec/spec_helper.rb
krikri-0.9.0 spec/spec_helper.rb
krikri-0.8.9 spec/spec_helper.rb
krikri-0.8.8 spec/spec_helper.rb
krikri-0.8.7 spec/spec_helper.rb
krikri-0.8.6 spec/spec_helper.rb
krikri-0.8.5 spec/spec_helper.rb
krikri-0.8.4 spec/spec_helper.rb
krikri-0.8.3 spec/spec_helper.rb
krikri-0.8.2 spec/spec_helper.rb
krikri-0.8.1 spec/spec_helper.rb
krikri-0.8.0 spec/spec_helper.rb
krikri-0.7.6 spec/spec_helper.rb
krikri-0.7.5 spec/spec_helper.rb