Sha256: 4c7677f306cd37ba341b638a80ec32df93dd1c46e323080b195226ac001d7e39

Contents?: true

Size: 705 Bytes

Versions: 19

Compression:

Stored size: 705 Bytes

Contents

Given /the global object/ do
  @model = VirtualBox::Global.global(true)
end

When /I read the media "(.+?)"/ do |property|
  @media = property.gsub(" ", "_").to_sym
  @value = @model.media.send(@media)
end

Then /I should get a matching length for "vms"/ do
  output = VBoxManage.execute("list", "vms")
  @value.length.should == output.split("\n").length
end

Then /I should get a matching length of media items/ do
  mapping = {
    :hard_drives => "hdds",
    :dvds => "dvds",
    :floppies => "floppies"
  }

  output = VBoxManage.execute("list", mapping[@media])
  count = output.split("\n").inject(0) do |acc, line|
    acc += 1 if line =~ /^UUID:/
    acc
  end

  @value.length.should == count
end

Version data entries

19 entries across 19 versions & 3 rubygems

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