Sha256: 9be5ac9c99469a1ba25502562bab8638ddf709b28897a8ae09d1f430c5b5388c

Contents?: true

Size: 645 Bytes

Versions: 7

Compression:

Stored size: 645 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

7 entries across 7 versions & 1 rubygems

Version Path
vagrant-libvirt-0.0.45 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.0.43 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.0.42 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.0.40 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.0.39 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.0.38 spec/unit/action/set_name_of_domain_spec.rb
vagrant-libvirt-0.0.37 spec/unit/action/set_name_of_domain_spec.rb