Sha256: 344d370d5dc00fc5c44f34df26391991d938dac2c3948573cde39b94456fa5d0

Contents?: true

Size: 644 Bytes

Versions: 10

Compression:

Stored size: 644 Bytes

Contents

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)
    first.should_not eq(second)
  end

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
vagrant-libvirt-0.0.36 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.0.35 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.0.33 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.0.32 spec/vagrant-libvirt/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.0.31 spec/vagrant-libvirt/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.0.30 spec/vagrant-libvirt/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.0.29 spec/vagrant-libvirt/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.0.28 spec/vagrant-libvirt/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.0.27 spec/vagrant-libvirt/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.0.26 spec/vagrant-libvirt/action/set_name_of_domain_spec.rb