Module: Kiba::Extend::JobTest::JobTestable

Included in:
CsvJob::Testable
Defined in:
lib/kiba/extend/job_test/job_testable.rb

Overview

Mixin module containing general JobTest behavior

Constant Summary collapse

ALLOWED_CONFIG_KEY_PATTERN =

Keys get dynamically set as instance variables in the concrete test classes, so they can’t contain characters disallowed in instance variable names

/^[a-z_]+$/

Instance Method Summary collapse

Instance Method Details

#job_dataObject



24
# File 'lib/kiba/extend/job_test/job_testable.rb', line 24

def job_data = @job_data ||= get_job_data

#resultHash

Returns:

  • (Hash)


14
15
16
17
18
19
20
21
22
# File 'lib/kiba/extend/job_test/job_testable.rb', line 14

def result
  run
  config[:desc] = desc
  if run == :success
    config.merge({status: run})
  else
    config.merge({status: :failure, got: err_msg(run)})
  end
end