So I dug into this a little more.  It has something to do with how puppet 
is loading the type definitions. 
There appears to be some kind of cache that gets loaded with type 
definitions when the first manifest gets processed.
If the first test that gets run is for a class that contains all the types 
necessary for classes that get tested later everything runs fine.
If on the other hand if the first test run is for a class that doesn't 
contain all the types used in later classes the later test fails. 

Given the example I posted
This works correctly.
rspec spec/classes/test_spec.rb spec/classes/test__c_spec.rb
This doesn't
rspec spec/classes/test__c_spec.rb spec/classes/test_spec.rb

Running them both separately works too.

On Monday, October 29, 2012 2:48:25 PM UTC-5, Nathan Huff wrote:
>
> Looks like the subnamespace thing isn't important either.  Just having two 
> classes triggers this as well.
>
> On Monday, October 29, 2012 1:13:05 PM UTC-5, Nathan Huff wrote:
>>
>> OK so I have what I think is a minimal test case here:
>>
>> https://github.com/nhuff/spec-failure
>>
>> The readme has a list of gems I have installed in it.
>>
>> You seem to need spec tests for two classes, one of which is in a sub 
>> namespace of the other.
>> In this case 'test' and 'test::c'.  With both spec files in place the 
>> system complains about anchor not being defined.
>> If you remove the test file for test::c the test for class test will pass.
>>
>

-- 
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/-/6MSfkla3fzMJ.
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