Class: Rutema::Runners::NoOp

Inherits:
Default
  • Object
show all
Defined in:
lib/rutema/core/runner.rb

Overview

Fake runner which does not run the passed steps but just sets their execution status to :success

Steps that do not respond to :run have their status set to :warning.

Returns the step after "executing" it successfully

Instance Attribute Summary

Attributes inherited from Default

#context, #setup, #teardown

Instance Method Summary collapse

Methods inherited from Default

#initialize, #run

Methods included from Messaging

#error, #message

Constructor Details

This class inherits a constructor from Rutema::Runners::Default

Instance Method Details

#run_step(step, _meta) ⇒ Object

Simulate running the step by setting its status to :success

If the step does not respond to :run then :warning is set as its status.

  • step -


171
172
173
174
175
176
177
178
# File 'lib/rutema/core/runner.rb', line 171

def run_step(step, _meta)
  unless step.has_cmd? && step.cmd.respond_to?(:run)
    message("No command associated with step '#{step.step_type}'. Step number is #{step.number}")
    step.status = :warning
  end
  step.status = :success if step.ignore?
  return step
end