1 |
7157fffb
|
Mike McCune
|
require 'rubygems'
|
2 |
|
|
require 'minitest/autorun'
|
3 |
|
|
|
4 |
|
|
require './lib/runcible'
|
5 |
|
|
|
6 |
5198c758
|
Mike McCune
|
class PuppetInstallDistributorTest < MiniTest::Unit::TestCase
|
7 |
7157fffb
|
Mike McCune
|
def setup
|
8 |
c0df0f4c
|
Evgeni Golov
|
@dist = Runcible::Models::PuppetInstallDistributor.new('/etc/puppet', :subdir => 'modules')
|
9 |
7157fffb
|
Mike McCune
|
end
|
10 |
|
|
|
11 |
|
|
def test_config
|
12 |
c0df0f4c
|
Evgeni Golov
|
config = {'install_path' => '/etc/puppet', 'subdir' => 'modules', 'auto_publish' => false}
|
13 |
7157fffb
|
Mike McCune
|
assert_equal config, @dist.config
|
14 |
|
|
end
|
15 |
|
|
|
16 |
c0df0f4c
|
Evgeni Golov
|
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 |
7157fffb
|
Mike McCune
|
def test_type_id
|
23 |
|
|
assert_equal('puppet_install_distributor', @dist.type_id)
|
24 |
|
|
end
|
25 |
|
|
end |