One other issue I have I can't figure out (that is potentially related), I have a module backups which passes all tests and uses the concat module. Anything else that uses a backups define fails with the error:
Failure/Error: it { should create_exec('initialize repo') } Puppet::Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type concat at /Users/jlambert/Documents/puppet/gitolite/spec/fixtures/modules/backups/manifests/archive.pp:16 on node jlambertmbp.local Concat is included in the .fixtures for both the backups module and everything using it. On Oct 30, 2012, at 11:54 AM, Justin Lambert <jlamb...@infiniteviewtech.com> wrote: > I am adding spec tests to my modules and have run into an issue I can't seem > to figure out. > > I have a simple class: (ruby/manifests/init.pp) > class ruby { > include common > $blah = dirname('/tmp/test/file.txt') > file { $blah: ensure => director } > } > > And a spec file: (spec/classes/ruby_init_spec.rb) > require 'spec_helper' > describe 'ruby', :type => :class do > it { should contain_file('/tmp/test') } > end > > I have a simple define: (ruby/manifests/thin.pp) > define ruby::thin { > include common > $blah = dirname('/tmp/test/file.txt') > file { $blah: ensure => director } > } > > And a spec file: (spec/defines/ruby_thin_spec.rb) > require 'spec_helper' > describe 'ruby::thin', :type => :define do > let(:title) { 'test_site' } > it { should contain_file('/tmp/test') } > end > > My .fixtures.yml contains: > fixtures: > repositories: > common: gitol...@git.mycompany.com:puppet/mycompany-common.git > symlinks: > ruby: "#{source_dir}" > > common/lib/puppet/parser/functions/dirname.rb exists and is based off of > https://github.com/camptocamp/puppet-common/blob/master/lib/puppet/parser/functions/dirname.rb. > I've been using it for a very long time without issue. > > > Any thoughts as to what I'm missing? I think I've narrowed it down to a > class works and the define does not. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > 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. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.