Sha256: 3104be745db67c7cadfb73d295b8c30613d8204bd507d663fa7d7152d18e6a44

Contents?: true

Size: 780 Bytes

Versions: 9

Compression:

Stored size: 780 Bytes

Contents

Given(/^an empty auton$/) do
  class EmptyAuton
    include StructureMapper::Hash

    attribute foo: String
  end
  @auton_type="EmptyAuton"
end

When(/^I create the auton$/) do
  @auton_id = Celluloid::Actor[:nestene_core].create_auton @auton_type
end

Then(/^the Auton should be in the READY state$/) do
  expect(Celluloid::Actor["storage:%s" % @auton_id].get.state).to eq(:ready)
end

When(/^I try to create an auton with a non\-existing type$/) do
  begin
    @auton_type = Celluloid::Actor[:nestene_core].create_auton "SomeNotExistingType"
  rescue Exception => exception
    @exception = exception
  end
end

Then(/^an exception should be raised$/) do
  expect(@exception).not_to be_nil
end

Then(/^the auton should not be created$/) do
  expect(@auton_type).to be_nil
end

Version data entries

9 entries across 9 versions & 1 rubygems

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