Sha256: 446d6f19d7a32eca06aa0b7f1b18deeaa22320125395ac164a3814686e2fbea9

Contents?: true

Size: 783 Bytes

Versions: 4

Compression:

Stored size: 783 Bytes

Contents

# frozen_string_literal: true

require "pathname"

SPEC_ROOT = File.expand_path(__dir__).freeze
LOG_DIR = Pathname(SPEC_ROOT).join("..").join("log")

require_relative "support/coverage" if ENV["COVERAGE"].eql?("true")

require "hanami"
begin; require "byebug"; rescue LoadError; end
require "hanami/utils/file_list"
require "hanami/devtools/unit"

Hanami::Utils::FileList["./spec/support/**/*.rb"].each do |file|
  next if file.include?("hanami-plugin")

  require file
end

RSpec.configure do |config|
  config.after(:suite) do
    # TODO: Find out what causes logger to create this dir when running specs.
    #       There's probably a test app class being created somewhere with root
    #       not pointing to a tmp dir.
    FileUtils.rm_r(LOG_DIR) if LOG_DIR.exist?
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hanami-2.0.3 spec/spec_helper.rb
hanami-2.0.2 spec/spec_helper.rb
hanami-2.0.1 spec/spec_helper.rb
hanami-2.0.0 spec/spec_helper.rb