Sha256: 0d78fed70a9d94b3a0cf4d5d15bb8ffd6a056d8a36e8f17dd9f86effede658e9

Contents?: true

Size: 876 Bytes

Versions: 5

Compression:

Stored size: 876 Bytes

Contents

require 'test_helper'
require_relative './support/dummy_active_job'
require_relative './support/dummy_dynflow_action'
require_relative './support/dummy_recurring_dynflow_action'
require_relative './support/dummy_proxy_action'
require_relative './support/dummy_task_group'

require 'dynflow/testing'

FactoryBot.definition_file_paths = ["#{ForemanTasks::Engine.root}/test/factories"]
FactoryBot.find_definitions

ForemanTasks.dynflow.require!
ForemanTasks.dynflow.config.disable_active_record_actions = true

# waits for the passed block to return non-nil value and reiterates it while getting false
# (till some reasonable timeout). Useful for forcing the tests for some event to occur
def wait_for(waiting_message = 'something to happen')
  30.times do
    ret = yield
    return ret if ret
    sleep 0.3
  end
  raise "waiting for #{waiting_message} was not successful"
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman-tasks-0.14.6 test/foreman_tasks_test_helper.rb
foreman-tasks-0.15.1 test/foreman_tasks_test_helper.rb
foreman-tasks-0.15.0 test/foreman_tasks_test_helper.rb
foreman-tasks-0.14.5 test/foreman_tasks_test_helper.rb
foreman-tasks-0.14.4 test/foreman_tasks_test_helper.rb