Sha256: c03c0c3768f594721429829e0001016159b190e2871cb84b235d678b4f3d03ea

Contents?: true

Size: 1.65 KB

Versions: 3

Compression:

Stored size: 1.65 KB

Contents

# Configure Rails Environment
ENV["RAILS_ENV"] ||= 'test'

if ENV['COVERAGE']
  require 'simplecov'
  SimpleCov.start 'rails'
  SimpleCov.command_name "spec"
end

require File.expand_path("../internal/config/environment.rb",  __FILE__)

require File.expand_path('../spec_patch', __FILE__)
require 'curate/spec_support'
require 'database_cleaner'

require 'curate/internal/factories'

Rails.backtrace_cleaner.remove_silencers!

# This file was generated by the `rspec --init` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# Require this file using `require "spec_helper"` to ensure that it is only
# loaded once.
#
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
RSpec.configure do |config|
  config.treat_symbols_as_metadata_keys_with_true_values = true
  config.run_all_when_everything_filtered = true
  config.fixture_path = File.expand_path("../fixtures", __FILE__)

  # Run specs in random order to surface order dependencies. If you find an
  # order dependency and want to debug it, you can fix the order by providing
  # the seed, which is printed after each run.
  #     --seed 1234
  config.order = 'random'

  config.include Devise::TestHelpers, type: :controller
  config.include InputSupport, type: :input, example_group: {
    file_path: config.escaped_path(%w[spec inputs])
  }

  config.use_transactional_fixtures = false

  config.before(:suite) do
    ActiveFedora::Base.destroy_all
    DatabaseCleaner.strategy = :truncation
    DatabaseCleaner.clean_with(:truncation)
  end

  config.before(:each) do
    DatabaseCleaner.start
  end

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

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
curate-0.5.1 spec/spec_helper.rb
curate-0.5.0 spec/spec_helper.rb
curate-0.4.2 spec/spec_helper.rb