-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chefspec 3.1 #28
Chefspec 3.1 #28
Conversation
COOK-4120 in tickets.opscode.com |
@@ -12,11 +12,11 @@ | |||
expect(template).to be | |||
expect(template.source).to eq('munin-node.conf.erb') | |||
expect(template.mode).to eq('0644') | |||
expect(template).to notify('service[munin-node]', :restart) | |||
notify('service[munin-node]').to(:restart) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't a test - you want:
expect(template).to notify('service[munin-node]').to(:restart)
This whole test should read:
expect(chef_run).to create_template('/etc/munin/munin-node.conf').with(
source: 'munin-node.conf.erb',
mode: '0644',
)
template = chef_run.template('/etc/munin/munin-node.conf')
expect(template).to notify('service[munin-node]').to(:restart)
- depend on chefspec ~>3.1 instead of ~>3.1.0 - simplify the preparation of the runner in server_spec.rb - linebreaks for server_spec.rb - improve the template and service tests in client_spec.rb
This could be better? |
@kampfschlaefer - Thanks for your work on this. Can you please fix the error? |
@sethvargo - Thanks for the comments |
@jesseadams I would love to fix the error. If I could reproduce it (did a
|
It looks like this is an issue with rubocop v0.16.0 and rainbow v2.0.0 and is now fixed in rubocop v0.18.0, released today. |
Thanks for the heads up @btm. Will try that out here in a bit. |
I had Travis re-run the build and it's passing now. |
I am trying to write some more tests for munin. But munin only makes sense with a lot of searching and real results. So it would be fun to use chef-solo with chefspec for munin. Which in turn requires upcoming chefspec3.1.
So lets make this cookbook depend on chefspec3.1.0.beta.1.
Oh, and set the auth-method to htpasswd so the cookbook converges without throwing an error because of missing openid-stuff.