features/step_definitions/common_steps.rb (6 lines of code) (raw):

After do @agent&.stop end Given('an agent') do @agent = ElasticAPM.start end