Error when running rspec
Closed this issue · 2 comments
timurb commented
After I've done regular bundle install
I've tried running tests but the following error appears:
$ bundle exec rspec
FFF
Failures:
1) logrotate::default installs the logrotate package
Failure/Error: expect(chef_run).to install_package('logrotate')
No package resource matching name 'logrotate' with action :install found.
# ./spec/unit/recipes/default_spec.rb:7:in `block (2 levels) in <top (required)>'
2) logrotate::global includes the default recipe
Failure/Error: expect(chef_run).to include_recipe('logrotate::default')
expected: ['logrotate::default']
got: []
# ./spec/unit/recipes/global_spec.rb:7:in `block (2 levels) in <top (required)>'
3) logrotate::global writes the configuration template
Failure/Error: expect(template).to be
expected nil to evaluate to true
# ./spec/unit/recipes/global_spec.rb:12:in `block (2 levels) in <top (required)>'
Finished in 0.07624 seconds
3 examples, 3 failures
Failed examples:
rspec ./spec/unit/recipes/default_spec.rb:6 # logrotate::default installs the logrotate package
rspec ./spec/unit/recipes/global_spec.rb:6 # logrotate::global includes the default recipe
rspec ./spec/unit/recipes/global_spec.rb:10 # logrotate::global writes the configuration template
I'm running Ubuntu 13.10 x64 with ruby 1:1.9.3 installed (ruby 1.9.3p194) and bundler 1.5.3 installed.
Foodcritic and rubocop pass ok.
stevendanna commented
Thanks for this. I'm seeing the same error after I re-bundle installed. I'll take look.
stevendanna commented
Updating ChefSpec(b45a378) seems to resolve this issue.
> be rspec
...
Finished in 1.79 seconds
3 examples, 0 failures
Thanks again.