Hi,

How can I verify the template exists in the given path?  Example,

Given the following in my manifest:

if $somevar == 'true' {
        $templatefile='mymodule/mytemplate.xml.erb'
}
else {
        $templatefile='mymodule/mytemplate2.xml.erb'
}
file{"somefile.txt":
        ensure => present,
        content => template($templatefile)
}


How can I test that the template file exists in the given module path?

File.exists?("../../../#{templatefile}").should be_true ???

Additionally can I test if the variable $templatefile or $somevar is correct 
and my logic is sane.  Is there a way to retrieve the manifest variables within 
spec tests?

example:

        $somevar.should eq('true') ???



Corey


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to