Sha256: de69a0657913a18aea1b3dc4f779f88d19c4d07428123e6f88dd78f11f40fbe0

Contents?: true

Size: 994 Bytes

Versions: 1

Compression:

Stored size: 994 Bytes

Contents

ENV["RAILS_ENV"] ||= "test"

require 'engine_cart'
path = File.expand_path(File.join('..', '..', '..', '.internal_test_app'), __FILE__)
EngineCart.load_application! path

require 'bundler/setup'
require 'rspec/rails'
require 'hydra-core'
require "factory_bot"
require "factories"

def coverage_needed?
  ENV['COVERAGE'] || ENV['TRAVIS']
end

if coverage_needed?
  require 'simplecov'
  require 'coveralls'

  SimpleCov.root(File.expand_path('../../../', __FILE__))
  SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
    [
      SimpleCov::Formatter::HTMLFormatter,
      Coveralls::SimpleCov::Formatter
    ]
  )
  SimpleCov.start('rails')
end

ActiveFedora::Base.logger = Logger.new(STDOUT)

require 'active_fedora/cleaner'
RSpec.configure do |config|
  config.include Devise::Test::ControllerHelpers, type: :controller
  config.use_transactional_fixtures = true
  config.infer_spec_type_from_file_location!

  config.before(:each) do
    ActiveFedora::Cleaner.clean!
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hydra-core-10.6.1 spec/spec_helper.rb