Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

rspec test duplicated class

I have the main init.pp class, which takes a list of parameters and then makes calls to other classes from within it.

When writing rspec tests, i get errors saying i have duplicated class:

  Duplicate declaration: Class[Sudo::User_alias] is already declared; cannot redeclare at /etc/puppetlabs/puppet/modules/sudo/manifests/init.pp:46 on node
 # ./sudo/spec/classes/user__alias_spec.rb:13:in `block (2 levels) in <top (required)>'

It seems to see the class { 'sudo::user_alias': } call in init.pp as a duplicated class to that of class sudo::user_alias { } inside of it's own class file.