Sha256: 72897668e48fad4cc9d40ae5e703fccac47bbb1e74d1b4e4b0464b8276e55bed

Contents?: true

Size: 775 Bytes

Versions: 69

Compression:

Stored size: 775 Bytes

Contents

# This calls the main test_helper in Foreman-core
require 'test_helper'

# Add plugin to FactoryBot's paths
FactoryBot.definition_file_paths << File.join(File.dirname(__FILE__), 'factories')
# FactoryBot.definition_file_paths << "#{Katello::Engine.root}/test/factories"
FactoryBot.reload

module FolderIsolation
  extend ActiveSupport::Concern

  included do
    setup do
      @tmpdir = Dir.mktmpdir(self.class.name.underscore)

      ForemanInventoryUpload.stubs(:base_folder).returns(@tmpdir)
      ForemanInventoryUpload.instance_variable_set(:@outputs_folder, nil)
      ForemanInventoryUpload.instance_variable_set(:@uploads_folders, nil)
    end

    teardown do
      FileUtils.remove_entry @tmpdir
      ForemanInventoryUpload.unstub(:base_folder)
    end
  end
end

Version data entries

69 entries across 69 versions & 2 rubygems

Version Path
foreman_rh_cloud-2.0.18.1 test/test_plugin_helper.rb
foreman_rh_cloud-1.0.18 test/test_plugin_helper.rb
foreman_rh_cloud-2.0.18 test/test_plugin_helper.rb
foreman_rh_cloud-1.0.17 test/test_plugin_helper.rb
foreman_rh_cloud-2.0.17 test/test_plugin_helper.rb
foreman_rh_cloud-3.0.17 test/test_plugin_helper.rb
foreman_rh_cloud-2.0.16 test/test_plugin_helper.rb
foreman_rh_cloud-1.0.16 test/test_plugin_helper.rb
foreman_rh_cloud-3.0.16 test/test_plugin_helper.rb
foreman_rh_cloud-1.0.15 test/test_plugin_helper.rb
foreman_rh_cloud-2.0.15 test/test_plugin_helper.rb
foreman_rh_cloud-3.0.15 test/test_plugin_helper.rb
foreman_rh_cloud-3.0.14 test/test_plugin_helper.rb
foreman_rh_cloud-2.0.14 test/test_plugin_helper.rb
foreman_rh_cloud-1.0.14 test/test_plugin_helper.rb
foreman_rh_cloud-0.9.14 test/test_plugin_helper.rb
foreman_rh_cloud-0.9.13.1 test/test_plugin_helper.rb
foreman_rh_cloud-1.0.13.1 test/test_plugin_helper.rb
foreman_rh_cloud-2.0.13.1 test/test_plugin_helper.rb
foreman_rh_cloud-0.9.13 test/test_plugin_helper.rb