Sha256: 4402b0460490e14583ef128dc9b94093236867127fc7b7740be760986993a2c4

Contents?: true

Size: 1.06 KB

Versions: 19

Compression:

Stored size: 1.06 KB

Contents

Given /I set the VM "(.+?)" to "(.+?)"/ do |key, value|
  VBoxManage.execute("modifyvm", @name, "--#{key}", value)
end

Given /I set the VM properties:/ do |properties|
  properties.hashes.each do |hash|
    Given %Q[I set the VM "#{hash["name"]}" to "#{hash["value"]}"]
  end
end

Given /I reload the VM$/ do
  Given %Q[I find a VM identified by "#{@name}"]
end

When /I find a VM identified by "(.+?)"/ do |name|
  @name = name
  @output = VBoxManage.vm_info(name)
  @vm = VirtualBox::VM.find(name)
  @model = @vm
end

When /I reload the VM info$/ do
  @output = VBoxManage.vm_info(@name)
end

When /I save the VM/ do
  @vm.save
end

Then /the VM should not exist/ do
  @output.should be_empty
  @vm.should be_nil
end

Then /the VM should exist/ do
  @output.should have_key("UUID")
  @vm.should_not be_nil
end

Then /the "(.+?)" properties should match/ do |type|
  map = {
    "BIOS" => BIOS_MAPPINGS,
    "CPU" => CPU_MAPPINGS,
    "HW virt" => HWVIRT_MAPPINGS,
    "VM" => VM_MAPPINGS
  }

  object = type == "VM" ? @vm : @relationship
  test_mappings(map[type], object, @output)
end

Version data entries

19 entries across 19 versions & 3 rubygems

Version Path
virtualbox-0.9.2 features/step_definitions/vm_steps.rb
virtualbox-0.9.1 features/step_definitions/vm_steps.rb
virtualbox-0.9.0 features/step_definitions/vm_steps.rb
virtualbox-0.8.6 features/step_definitions/vm_steps.rb
virtualbox-0.8.5 features/step_definitions/vm_steps.rb
virtualbox-0.8.4 features/step_definitions/vm_steps.rb
velir_virtualbox-0.8.4 features/step_definitions/vm_steps.rb
virtualbox-0.8.3 features/step_definitions/vm_steps.rb
virtualbox-0.8.2 features/step_definitions/vm_steps.rb
virtualbox-0.8.1 features/step_definitions/vm_steps.rb
virtualbox-0.8.0 features/step_definitions/vm_steps.rb
virtualbox-0.7.9 features/step_definitions/vm_steps.rb
virtualbox-0.7.8 features/step_definitions/vm_steps.rb
virtualbox-0.7.7 features/step_definitions/vm_steps.rb
virtualbox-0.7.6 features/step_definitions/vm_steps.rb
bbrowning-virtualbox-0.7.6.dev features/step_definitions/vm_steps.rb
virtualbox-0.7.5 features/step_definitions/vm_steps.rb
virtualbox-0.7.4 features/step_definitions/vm_steps.rb
virtualbox-0.7.3 features/step_definitions/vm_steps.rb