RSpec validate that a function gets called

asked 2016-08-26 10:19:43 -0500

fatmcgav gravatar image

I'm attempting to test some of our profile classes.

One of the common patterns is that the class will call a statement function, and I want to be able to validate that it actually gets called. I've found 'rspec-puppet-utils', which allows me to Mock functions, but I'm struggling to find a way of validating that the function actually gets called...

Has anyone done anything similar? Any pointers?

Cheers
Gavin

edit retag flag offensive close merge delete