Given(/^I have a running Auton that has one step without parameters$/) do
  class OneStepAuton < Nestene::Auton
    def no_params_step
    end
    attribute foo: String
  end
  @auton_id =  Celluloid::Actor[:nestene_core].create_auton "OneStepAuton"
end

When(/^I schedule that step$/) do
  set_auth_header
  post "/autons/#{@auton_id}/step", { name: 'no_params_step'}.to_json, 'Content-Type' => 'application/json'
  expect(last_response.status).to eq(201)
  @step_id = last_response.body
end

Then(/^the Auton should have the method scheduled$/) do
  Celluloid::Actor[:nestene_core].wait_for_execution_result @auton_id, @step_id
end
