I am writing rspec tests for my modules and have not been able to figure
out how to test that a function (alert/fail specifically) has been called.
For example:
case $::operatingsystem {
'Debian','Ubuntu': {
class { 'sensu::repo::apt': ensure => $ensure, repo => $repo }
}
'Fedora','RedHat','CentOS': {
class { 'sensu::repo::yum': ensure => $ensure }
}
default: { alert("${::operatingsystem} not supported yet") }
}
I'd like to be able to verify unsupported operating systems are correctly
flagged. I haven't been able to find the answer with google and everyone
in #puppet that has responded wasn't sure.
Thanks,
Justin
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.