Hi Justin,
I think you could add an expectation on the `scope` object to check for the
method call. The puppetlabs_spec_helper gem (which is pulled in by
rspec-puppet) exposes this (
https://github.com/puppetlabs/puppetlabs_spec_helper/blob/master/lib/puppetlabs_spec_helper/puppetlabs_spec/puppet_
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 }
}