Hi all,
There is something amiss with what I am doing. I believe the following
should work.
puppetlabs_spec_helper (0.3.0)
rspec (2.11.0)
rspec-core (2.11.1)
rspec-expectations (2.11.2)
rspec-mocks (2.11.1)
rspec-puppet (0.1.4)
.
├── manifests
│ └── init.pp
├── Rakefile
└── spec
├── classes
│ └── testthis_spec.rb
├── defines
├── fixtures
│ ├── manifests
│ │ └── site.pp
│ └── modules
│ └── testthis
│ └── manifests -> ../../../../manifests
├── functions
├── hosts
└── spec_helper.rb
$ cat manifests/init.pp
class testthis {
notify{''this notify is alive'': }
}
$ cat spec/classes/testthis_spec.rb
require ''rspec-puppet''
describe "testthis" do
let(:node) {''fake''}
it { should contain_notify(''this notify is
alive'').with_content(/notify is alive/)}
end
$ rake spec
/usr/bin/ruby1.8 -S rspec spec/classes/testthis_spec.rb
F
Failures:
1) testthis
Failure/Error: it { should contain_notify(''this notify is
alive'').with_content(/notify is alive/)}
Puppet::Error:
Could not find class testthis for fake at line 3 on node fake
# ./spec/classes/testthis_spec.rb:7
Finished in 0.02659 seconds
1 example, 1 failure
Failed examples:
rspec ./spec/classes/testthis_spec.rb:7 # testthis
rake aborted!
ruby -S rspec spec/classes/testthis_spec.rb failed
Tasks: TOP => spec
(See full trace by running task with --trace)
It is weird because I have another test that works(which I wrote!) but
this simple one does not - hence there is something fundamentally
wrong with my understanding of how this works.
Thanks,
Den
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.