Sha256: ce109c49fcafedc99fa17130e73bb926e59e5f7f570a18e833c20c121f2b6e2b

Contents?: true

Size: 1.04 KB

Versions: 5

Compression:

Stored size: 1.04 KB

Contents

# Encoding: utf-8
require 'spec_helper'

RSpec.describe Packer::Builder::VirtualBoxISO do
  let(:builder) { Packer::Builder.get_builder(Packer::Builder::VIRTUALBOX_ISO) }
  let(:in_commands_strings)  { [["command1", "1"], ["command2", "2"]] }
  let(:in_commands_mixed)    { [["command1",  1 ], ["command2",  2 ]] }
  let(:out_commands_strings) { [["command1", "1"], ["command2", "2"]] }

  describe '#initialize' do
    it 'has a type of virtualbox-iso' do
      expect(builder.data['type']).to eq(Packer::Builder::VIRTUALBOX_ISO)
    end
  end

  describe '#vboxmanage' do
    it 'builds an array of arrays of strings' do
      builder.vboxmanage(in_commands_mixed)
      expect( builder.data['vboxmanage'] ).to eq(out_commands_strings)
      builder.data.delete('vboxmanage')
    end
  end

  describe '#vboxmanage_post' do
    it 'builds an array of arrays of strings' do
      builder.vboxmanage_post(in_commands_mixed)
      expect( builder.data['vboxmanage_post'] ).to eq(out_commands_strings)
      builder.data.delete('vboxmanage_post')
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
packer-config-1.3.1 spec/packer/builders/virtualbox_spec.rb
packer-config-1.3.0 spec/packer/builders/virtualbox_spec.rb
packer-config-1.2.0 spec/packer/builders/virtualbox_spec.rb
packer-config-1.1.0 spec/packer/builders/virtualbox_spec.rb
packer-config-1.0.0 spec/packer/builders/virtualbox_spec.rb