1
|
require 'rubygems'
|
2
|
require 'minitest/autorun'
|
3
|
|
4
|
require './lib/runcible'
|
5
|
|
6
|
class PuppetInstallDistributorTest < MiniTest::Unit::TestCase
|
7
|
def setup
|
8
|
@dist = Runcible::Models::PuppetInstallDistributor.new('/etc/puppet', :subdir => 'modules')
|
9
|
end
|
10
|
|
11
|
def test_config
|
12
|
config = {'install_path' => '/etc/puppet', 'subdir' => 'modules', 'auto_publish' => false}
|
13
|
assert_equal config, @dist.config
|
14
|
end
|
15
|
|
16
|
def test_config_nosubdir
|
17
|
nosubdir_dist = Runcible::Models::PuppetInstallDistributor.new('/etc/puppet')
|
18
|
config = {'install_path' => '/etc/puppet', 'auto_publish' => false}
|
19
|
assert_equal config, nosubdir_dist.config
|
20
|
end
|
21
|
|
22
|
def test_type_id
|
23
|
assert_equal('puppet_install_distributor', @dist.type_id)
|
24
|
end
|
25
|
end
|