I stumbled against this text :

you can write a mock function my_mock_function.rb and put it under

{module name}/spec / fixtures / modules / {module name}/ lib / puppet / parser /

If you put the real function(s) so there ?






On 28/03/14 15:39, Trevor Vaughan wrote:
Hopefully I didn't just overlook this in the docs but, in rspec-puppet, how would you go about getting the value of $bar from the following?

class foo {
  $bar = interesting_function('baz')
}

I've inspected everything that I think is obvious and I don't want to try and stub what 'interesting_function' should be doing since it's dynamic.

Any ideas?

Thanks,

Trevor

--
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
tvaug...@onyxpoint.com <mailto:tvaug...@onyxpoint.com>

-- This account not approved for unencrypted proprietary information --
--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+unsubscr...@googlegroups.com <mailto:puppet-dev+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/CANs%2BFoVY%3DCtqRSjbOQYN-j%2B9PCkfYbXnGW-9qPOf1R6ZB%3DtNSA%40mail.gmail.com <https://groups.google.com/d/msgid/puppet-dev/CANs%2BFoVY%3DCtqRSjbOQYN-j%2B9PCkfYbXnGW-9qPOf1R6ZB%3DtNSA%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.


--
Johan De Wit

Open Source Consultant

Red Hat Certified Engineer              (805008667232363)
Puppet Certified Professional 2013/2014 (PCP0000006)
_________________________________________________________
Open-Future Phone +32 (0)2/255 70 70
Zavelstraat 72              Fax       +32 (0)2/255 70 71
3071 KORTENBERG             Mobile    +32 (0)474/42 40 73
BELGIUM                     http://www.open-future.be
_________________________________________________________

Next Events:
Puppet Introduction Course | 
http://www.open-future.be/puppet-introduction-course-14th-april
Puppet Advanced Training | 
http://www.open-future.be/puppet-advanced-training-15-till-17th-april
Linux Training | https://www.open-future.be/linux-training-5-till-9th-may
Puppet Introduction Course | 
https://www.open-future.be/puppet-introduction-course-12th-may
Subscribe to our newsletter | http://eepurl.com/BUG8H

--
You received this message because you are subscribed to the Google Groups "Puppet 
Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/5335948B.5070003%40open-future.be.
For more options, visit https://groups.google.com/d/optout.

Reply via email to