Displaying 1 result from an estimated 1 matches for "rmfunction".
Did you mean:
mfunction
2012 Jul 27
0
rspec-puppet: function stubs
...9;m looking for a way to stub a parser function within rspec-puppet. This
function returns data based on a database query and I''d rather not have to
populate dummy data inside my rspec tests.
I can redefine the function by doing something like the following:
Puppet::Parser::Functions::rmfunction("lookup_facts")
Puppet::Parser::Functions::newfunction(:lookup_facts, :type => :rvalue) {
''127.0.0.1'' }
but it isn''t in effect on the resulting catalog during the tests.
I''m thinking that either the catalog is already generated or I''m not...