Sha256: 23d1f23099800fd2e4416ea429d64ab567b8d2f20e8793bdf0f8082981582e81

Contents?: true

Size: 813 Bytes

Versions: 11

Compression:

Stored size: 813 Bytes

Contents

require 'ostruct'
require 'pathname'

class EnvironmentHelper
  attr_writer :domain_name

  attr_accessor :random_hostname, :name, :default_prefix

  def [](value)
    send(value.to_sym)
  end

  def cpus
    4
  end

  def memory
    1024
  end

  %w(cpus cpu_mode loader nvram boot_order machine_type disk_bus disk_device nested volume_cache kernel cmd_line initrd graphics_type graphics_autoport graphics_port graphics_ip graphics_passwd video_type video_vram keymap storage_pool_name disks cdroms driver).each do |name|
    define_method(name.to_sym) do
      nil
    end
  end

  def machine
    self
  end

  def provider_config
    self
  end

  def root_path
    Pathname.new('./spec/support/foo')
  end

  def domain_name
    # noop
  end

  def libvirt_compute
    OpenStruct.new(servers: [])
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
vagrant-libvirt-0.5.3 spec/support/environment_helper.rb
vagrant-libvirt-0.5.2 spec/support/environment_helper.rb
vagrant-libvirt-0.5.1 spec/support/environment_helper.rb
vagrant-libvirt-0.5.0 spec/support/environment_helper.rb
vagrant-libvirt-0.4.1 spec/support/environment_helper.rb
vagrant-libvirt-0.4.0 spec/support/environment_helper.rb
vagrant-libvirt-0.3.0 spec/support/environment_helper.rb
vagrant-libvirt-0.2.1 spec/support/environment_helper.rb
vagrant-libvirt-0.1.2 spec/support/environment_helper.rb
vagrant-libvirt-0.1.0 spec/support/environment_helper.rb
vagrant-libvirt-0.0.45 spec/support/environment_helper.rb