On 2014-30-04 15:19, KomodoDave wrote:
So I guess no-one knows how to achieve this?
Suggest that you write rspec tests for your custom functions.
Just mimic what is done for the built in functions.
As an example of a simple function - look at
spec/unit/parser/functions/sprintf_spec.rb
- henrik
On Tuesday, 29 April 2014 13:26:20 UTC+1, KomodoDave wrote:
Hi all,
I wrote a neat little script for Puppet 2.x to test custom functions
without needing to do a Puppet run. This involved creating a Scope
object using `Puppet::Parser::Scope.new` then calling `send` to send
a function call to it.
In Puppet 3 however, creating a Scope instance this way does not
work. Now a Compiler object is a required argument of the Scope
constructor, and a Node argument is a required argument of the
Compiler constructor, and the list goes on.
Does anyone know how I can most simply create a Scope object like I
did before?
Many thanks,
Dave
Notice: This email is confidential and may contain copyright
material of Ocado Limited (the "Company"). Opinions and views
expressed in this message may not necessarily reflect the opinions
and views of the Company.
If you are not the intended recipient, please notify us immediately
and delete all copies of this message. Please note that it is your
responsibility to scan this message for viruses.
Company reg. no. 3875000.
Ocado Limited
Titan Court
3 Bishops Square
Hatfield Business Park
Hatfield
Herts
AL10 9NE
Notice: This email is confidential and may contain copyright material
of Ocado Limited (the "Company"). Opinions and views expressed in this
message may not necessarily reflect the opinions and views of the Company.
If you are not the intended recipient, please notify us immediately and
delete all copies of this message.. Please note that it is your
responsibility to scan this message for viruses.
Company reg. no. 3875000.
Ocado Limited
Titan Court
3 Bishops Square
Hatfield Business Park
Hatfield
Herts
AL10 9NE
--
You received this message because you are subscribed to the Google
Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to puppet-users+unsubscr...@googlegroups.com
<mailto:puppet-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/3b007c68-5e67-4cfa-b4e1-d4ddea4b1429%40googlegroups.com
<https://groups.google.com/d/msgid/puppet-users/3b007c68-5e67-4cfa-b4e1-d4ddea4b1429%40googlegroups..com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/ljr02t%245r2%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.