Sha256: 7a5bcf9d1775ff3b9cd7803aed3605c2994f760690eeecf59a6504721d68f166

Contents?: true

Size: 685 Bytes

Versions: 18

Compression:

Stored size: 685 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe VagrantPlugins::ProviderLibvirt::Action::SetNameOfDomain do
  before :each do
    @env = EnvironmentHelper.new
  end

  it 'builds unique domain name' do
    @env.random_hostname = true
    dmn = VagrantPlugins::ProviderLibvirt::Action::SetNameOfDomain.new(Object.new, @env)
    first  = dmn.build_domain_name(@env)
    second = dmn.build_domain_name(@env)
    expect(first).to_not eq(second)
  end

  it 'builds simple domain name' do
    @env.default_prefix = 'pre_'
    dmn = VagrantPlugins::ProviderLibvirt::Action::SetNameOfDomain.new(Object.new, @env)
    expect(dmn.build_domain_name(@env)).to eq('pre_')
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
vagrant-libvirt-0.10.8 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.10.7 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.10.6 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.10.5 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.10.4 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.10.3 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.10.2 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.10.1 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.10.0 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.9.0 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.8.2 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.8.1 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.8.0 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.7.0 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.6.3 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.6.2 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.6.1 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.6.0 spec/unit/action/set_name_of_domain_spec.rb