On Wednesday, April 11, 2012 9:03:22 AM UTC-7, Jeff McCune wrote:
>
> On Tue, Apr 10, 2012 at 11:00 PM, Wil Cooley <wilcoo...@gmail.com> wrote:
>
> In general, you should assume the spec_helper for stdlib will
> initialize facter for you.  In fact, you don't need to do require
> 'facter' in your example specification.
>
> > You can see some of what I've been trying at
> > 
> https://github.com/wcooley/puppetlabs-stdlib/blob/master/spec/unit/puppet/parser/functions/has_interface_with_spec.rb
>
> Cool, I went ahead and pulled down your branch.  If I might make a
> suggestion, I notice you're developing on the "master branch" and you
> have a number of commits that have not actually been merged into the
> "master" branch of the puppetlabs repository.
>

Yeah, usually I do make branches; I think I mistakenly committed to master 
and then did not want to take the time to figure out how to move it on to a 
branch; your instructions below were very helpful. It would've taken me 
some hours between re-reading Pro Git and searching stackoverflow to figure 
it out on my own.
 

> The setup looks to be quite strange.  You shouldn't ever need to define a 
> get_scope method.  I recommend looking at the validate_re_spec.rb for a 
> good example.
>
It is strange; it's the result of an hour or two of thrashing about, 
throwing bits at the wall and trying to see if anything stuck. Toss in some 
frustrations with gem and getting a working rspec environment and it's a 
really bad dish.
 

> I'm also re-working your topic branch in my own if you'd like to take
> a look at the changes.
>
Thanks;  I think I was expecting to be able to get facts from the live 
system, which is obviously inferior to mocking the facts that should be 
expected. I've merged in your branch and looked at your reworked version; I 
think it makes sense and I see how to proceed with adding the rest of my 
tests.

Unfortunately, I am unable to run any of the rspec tests--not just in 
has_interface_with_spec.rb, but on any of the specs. They fail with:

     Failure/Error: Unable to find matching line from backtrace
     NoMethodError:
       undefined method `initialize_everything_for_tests' for 
#<Puppet::Util::Settings:0x2b7d43d59940>

I've got 2.7.13, RPMs built yesterday, both puppet and puppet-master 
installed:

$ rpm -qi puppet
Name        : puppet                       Relocations: (not relocatable)
Version     : 2.7.13                            Vendor: (none)
Release     : 1.el5                         Build Date: Tue 10 Apr 2012 
01:52:57 PM PDT
Install Date: Wed 11 Apr 2012 09:46:53 PM PDT      Build Host: 
rpm-builder.puppetlabs.lan
...

ISTR seeing something about this method in the commit logs recently...

Also, go ahead and reply to puppet-dev if you wish; I'm trying to use the 
Google Groups interface and it does not appear to let me direct my response 
to a different group.

Wil

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/Y1_YL3HbfVgJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to