The step def for running a shell command is quite long and gnarly, and you're using instance variables (e.g. @last_shell_command_output) to pass state to the subsequent step defs.
I would push this code down into the glue layer, maybe just make a method on that module like execute_on(machine, command) and have that wrap all the detail. You can then expose last_shell_command_output as another method / attribute on the glue module.
This will keep the step defs simpler and allow you to change the implementation of the glue layer without breaking the step defs.
The step def for running a shell command is quite long and gnarly, and you're using instance variables (e.g.
@last_shell_command_output
) to pass state to the subsequent step defs.I would push this code down into the glue layer, maybe just make a method on that module like
execute_on(machine, command)
and have that wrap all the detail. You can then exposelast_shell_command_output
as another method / attribute on the glue module.This will keep the step defs simpler and allow you to change the implementation of the glue layer without breaking the step defs.