Sha256: 6d5a960b5b26e110aa51d85e5490b8e032e6a952b8ea94f8c3fec9d6951b3dcc

Contents?: true

Size: 1.12 KB

Versions: 12

Compression:

Stored size: 1.12 KB

Contents

ENV["HISTORIOGRAPHY_ENV"] = "test"

require_relative "../init.rb"
require "ostruct"
require "factory_bot"

FactoryBot.definition_file_paths = %w{./factories ./spec/factories}
FactoryBot.find_definitions

RSpec.configure do |config|
  config.expect_with :rspec do |expectations|
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true
  end

  config.mock_with :rspec do |mocks|
    mocks.verify_partial_doubles = true
  end

  config.filter_run :focus
  config.run_all_when_everything_filtered = true

  config.example_status_persistence_file_path = "spec/examples.txt"

  if config.files_to_run.one?
    config.default_formatter = 'doc'
  end

  config.profile_examples = 10

  config.order = :random

  Kernel.srand config.seed

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

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

  config.before(:each, :logsql) do
    ActiveRecord::Base.logger = Logger.new(STDOUT)
  end

  config.after(:each, :logsql) do
    ActiveRecord::Base.logger = nil
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
historiographer-4.0.0 spec/spec_helper.rb
historiographer-3.1.2 spec/spec_helper.rb
historiographer-3.1.1 spec/spec_helper.rb
historiographer-3.1.0 spec/spec_helper.rb
historiographer-3.0.0 spec/spec_helper.rb
historiographer-2.0.1 spec/spec_helper.rb
historiographer-2.0.0 spec/spec_helper.rb
historiographer-1.4.3 spec/spec_helper.rb
historiographer-1.4.1 spec/spec_helper.rb
historiographer-1.4.0 spec/spec_helper.rb
historiographer-1.3.1 spec/spec_helper.rb
historiographer-1.3.0 spec/spec_helper.rb