Sha256: f1c3a30280c53f2f0fd114dc3dab31d47ecff4ca088d8c5a6ddde2b2125114d5

Contents?: true

Size: 842 Bytes

Versions: 10

Compression:

Stored size: 842 Bytes

Contents

Inferno::Application.boot(:suites) do
  init do
    use :logging

    require 'inferno/entities/test'
    require 'inferno/entities/test_group'
    require 'inferno/entities/test_suite'

    files_to_load = Dir.glob(File.join(Dir.pwd, 'lib', '*.rb'))

    if ENV['LOAD_DEV_SUITES'].present?
      ENV['LOAD_DEV_SUITES'].split(',').map(&:strip).reject(&:empty?).each do |suite|
        files_to_load.concat Dir.glob(File.join(Inferno::Application.root, 'dev_suites', suite, '**', '*.rb'))
      end
    end

    if ENV['APP_ENV'] == 'test'
      files_to_load.concat Dir.glob(File.join(Inferno::Application.root, 'spec', 'fixtures', '**', '*.rb'))
    end

    files_to_load.map! { |path| File.realpath(path) }

    files_to_load.each do |path|
      require_relative path
    end

    ObjectSpace.each_object(TracePoint, &:disable)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
inferno_core-0.4.18 lib/inferno/config/boot/suites.rb
inferno_core-0.4.17 lib/inferno/config/boot/suites.rb
inferno_core-0.4.16 lib/inferno/config/boot/suites.rb
inferno_core-0.4.15 lib/inferno/config/boot/suites.rb
inferno_core-0.4.14 lib/inferno/config/boot/suites.rb
inferno_core-0.4.13 lib/inferno/config/boot/suites.rb
inferno_core-0.4.12 lib/inferno/config/boot/suites.rb
inferno_core-0.4.11 lib/inferno/config/boot/suites.rb
inferno_core-0.4.10 lib/inferno/config/boot/suites.rb
inferno_core-0.4.9 lib/inferno/config/boot/suites.rb