Mocking a Template Helper Method


Hey Folks,
For some reason I can’t figure out how to mock a method in chefspec that we
are using in a Template Helper. We have the helper defined in a library
module (1). I’ve done some mocks in the past for other library methods,
however for some reason I can’t seem to figure out the right way to get
this to work for the template helper. Everything I’ve tried results in the
mocked response not coming back.

Does anyone have an example or any docs on how I might pull this off? I’ll
refrain from posting all my failed versions, but this is the one I thought
should work:

as well as