Sha256: aed80ed87f061401494b80171be67e589b730949dde227a61de2343743ebe574

Contents?: true

Size: 784 Bytes

Versions: 12

Compression:

Stored size: 784 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_rf(LOG_DIR) if LOG_DIR.exist?
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
hanami-2.2.1 spec/spec_helper.rb
hanami-2.2.0 spec/spec_helper.rb
hanami-2.2.0.rc1 spec/spec_helper.rb
hanami-2.2.0.beta2 spec/spec_helper.rb
hanami-2.2.0.beta1 spec/spec_helper.rb
hanami-2.1.0 spec/spec_helper.rb
hanami-2.1.0.rc3 spec/spec_helper.rb
hanami-2.1.0.rc2 spec/spec_helper.rb
hanami-2.1.0.rc1 spec/spec_helper.rb
hanami-2.1.0.beta2.1 spec/spec_helper.rb
hanami-2.1.0.beta2 spec/spec_helper.rb
hanami-2.1.0.beta1 spec/spec_helper.rb