Sha256: 84d78a351c7950b0a0b1d2279de4f9e9da785f7fdaf651b375351fa58426efeb

Contents?: true

Size: 776 Bytes

Versions: 9

Compression:

Stored size: 776 Bytes

Contents

Given(/^I have an Auton that access credentials in the first step$/) do
  class CredentialsAuton
    include StructureMapper::Hash

    attribute credentials: String

    attr_accessor :context

    def use_credentials
      context.credentials['mail.google.com']
    end
  end
  @auton_type="CredentialsAuton"
  @auton_id = Celluloid::Actor[:nestene_core].create_auton @auton_type
end

Given(/^the credentials are set$/) do
  Celluloid::Actor[:nestene_core].set_credentials({'mail.google.com' => 'creds'})
end

When(/^I execute the first step of the Auton$/) do
  step_execution_id = Celluloid::Actor[:nestene_core].schedule_step @auton_id, :use_credentials
  expect(Celluloid::Actor[:nestene_core].wait_for_execution_result(@auton_id, step_execution_id)).to eq('creds')
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
nestene-0.1.8 features/step_definitions/credentials_steps.rb
nestene-0.1.7 features/step_definitions/credentials_steps.rb
nestene-0.1.6 features/step_definitions/credentials_steps.rb
nestene-0.1.5 features/step_definitions/credentials_steps.rb
nestene-0.1.4 features/step_definitions/credentials_steps.rb
nestene-0.1.3 features/step_definitions/credentials_steps.rb
nestene-0.1.2 features/step_definitions/credentials_steps.rb
nestene-0.1.1 features/step_definitions/credentials_steps.rb
nestene-0.1.0 features/step_definitions/credentials_steps.rb