Hi Markus, you are missing an opening statement. Try: require 'spec_helper' describe 'class::name', :type => :class do describe 'irqbalance' do it { should include_class('irqbalance') } it { should include_class('irqbalance::data') } it { should contain_package('irqbalance').with(:ensure => 'installed') } end end
Cheers, Atha On Friday, May 25, 2012 at 8:35 AM, Markus Falb wrote: > I try do implement tests for my puppet code and was playing with > rspec-puppet but the following code gives me errors > > require 'spec_helper' > describe 'irqbalance' do > it { should include_class('irqbalance') } > it { should include_class('irqbalance::data') } > it { should contain_package('irqbalance').with(:ensure => 'installed') } > end > > The errors looks like > > NoMethodError: > undefined method `include_class' > NoMethodError: > undefined method `contain_package' > > I feel lost. > These methods are supposed to provided by rspec-puppet ? > > $ gem list|grep rspec > rspec (2.10.0) > rspec-core (2.10.1) > rspec-expectations (2.10.0) > rspec-mocks (2.10.1) > rspec-puppet (0.1.3) > > This is on OS-X > -- > Kind Regards, Markus Falb -- 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.