3
$:.unshift("../lib").unshift("../../lib") if __FILE__ =~ /\.rb$/
8
class TestBasic < Test::Unit::TestCase
11
# this is complicated, because we store references to the created
12
# objects in a central store
19
assert_nothing_raised() {
20
@component = Puppet.type(:component).create(
26
assert_nothing_raised() {
27
@filepath = tempfile()
28
@@tmpfiles << @filepath
29
@configfile = Puppet.type(:file).create(
35
assert_nothing_raised() {
36
@sleeper = Puppet.type(:service).create(
39
:path => exampledir("root/etc/init.d"),
44
assert_nothing_raised() {
51
#puts "Component is %s, id %s" % [@component, @component.object_id]
52
#puts "ConfigFile is %s, id %s" % [@configfile, @configfile.object_id]
56
[@sleeper,@configfile].each { |obj|
57
Puppet.debug "obj is %s" % obj
58
assert_nothing_raised(){
64
def test_name_equality
65
#puts "Component is %s, id %s" % [@component, @component.object_id]
77
def test_object_retrieval
78
[@sleeper,@configfile].each { |obj|
80
obj.class[obj.name].object_id,
88
assert_nothing_raised() {
89
transaction = @component.evaluate
91
assert_nothing_raised() {
94
assert_nothing_raised() {
95
@sleeper[:ensure] = :running
97
assert_nothing_raised() {
98
transaction = @component.evaluate
100
assert_nothing_raised() {
106
[@configfile,@sleeper,@component].each { |obj|
107
assert_nothing_raised {
108
assert_instance_of(String, obj.path)
114
# $Id: basic.rb 1793 2006-10-16 22:01:40Z luke $