Sha256: 3bc75b06e18e0751d8e336ab16c9517d978d0df473debab8ead92be6496bcd4c

Contents?: true

Size: 573 Bytes

Versions: 11

Compression:

Stored size: 573 Bytes

Contents

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

require 'dynflow/testing'

# Add plugin to FactoryGirl's paths
FactoryGirl.definition_file_paths << File.join(File.dirname(__FILE__), 'factories')
FactoryGirl.reload

# Foreman's setup doesn't handle cleaning up for Minitest::Spec
DatabaseCleaner.strategy = :transaction

class Minitest::Spec
  class << self
    alias_method :context, :describe
  end

  before :each do
    DatabaseCleaner.start
    Setting::RemoteExecution.load_defaults
  end

  after :each do
    DatabaseCleaner.clean
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
foreman_remote_execution-0.3.1 test/test_plugin_helper.rb
foreman_remote_execution-0.3.0 test/test_plugin_helper.rb
foreman_remote_execution-0.2.3 test/test_plugin_helper.rb
foreman_remote_execution-0.2.2 test/test_plugin_helper.rb
foreman_remote_execution-0.2.1 test/test_plugin_helper.rb
foreman_remote_execution-0.1.2 test/test_plugin_helper.rb
foreman_remote_execution-0.1.1 test/test_plugin_helper.rb
foreman_remote_execution-0.1.0 test/test_plugin_helper.rb
foreman_remote_execution-0.0.10 test/test_plugin_helper.rb
foreman_remote_execution-0.0.8 test/test_plugin_helper.rb
foreman_remote_execution-0.0.7 test/test_plugin_helper.rb