-
Notifications
You must be signed in to change notification settings - Fork 145
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
fix broken coverage rake task. #10
Conversation
$ rake coverage (in /Users/mafalb/puppet/modules/mdraid) /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -S rcov -Ispec:lib --exclude spec ./spec/classes/mdmonitor_off_spec.rb ./spec/classes/mdmonitor_spec.rb ./spec/classes/mdraid_rm_spec.rb ./spec/classes/mdraid_spec.rb /Library/Ruby/Gems/1.8/gems/puppetlabs_spec_helper-0.1.0/lib/puppetlabs_spec_helper/puppetlabs_spec/matchers.rb:8:in `alias_method': undefined method `should' for module `RSpec::Matchers::BlockAliases' (NameError) from /Library/Ruby/Gems/1.8/gems/puppetlabs_spec_helper-0.1.0/lib/puppetlabs_spec_helper/puppetlabs_spec/matchers.rb:8 from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' from /Library/Ruby/Gems/1.8/gems/puppetlabs_spec_helper-0.1.0/lib/puppetlabs_spec_helper/puppetlabs_spec_helper.rb:12 from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' from /Library/Ruby/Gems/1.8/gems/puppetlabs_spec_helper-0.1.0/lib/puppetlabs_spec_helper/puppet_spec_helper.rb:1 from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' from /Library/Ruby/Gems/1.8/gems/puppetlabs_spec_helper-0.1.0/lib/puppetlabs_spec_helper/module_spec_helper.rb:1 from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `require' from ./spec/spec_helper.rb:2 from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' from ./spec/classes/mdmonitor_off_spec.rb:25 from /Library/Ruby/Gems/1.8/gems/rcov-1.0.0/bin/rcov:539:in `load' from /Library/Ruby/Gems/1.8/gems/rcov-1.0.0/bin/rcov:539 from /usr/bin/rcov:19:in `load' from /usr/bin/rcov:19 rake aborted! /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -S rcov -Ispec:lib --exclude spec ./spec/classes/mdmonitor_off_spec.rb ./spec/classes/mdmonitor_spec.rb ./spec/classes/mdraid_rm_spec.rb ./spec/classes/mdraid_spec.rb failed (See full trace by running task with --trace)
This error is because the Also, if you're looking at the dependency chain |
It is probably quite true that the correct fix is to refactor the requires a bit more.. I'd personally be happy to see this get merged in so that at least the task isn't broken. |
fix broken coverage rake task.
$ rake coverage
...
/Library/Ruby/Gems/1.8/gems/puppetlabs_spec_helper-0.1.0/lib/puppetlabs_spec_helper/puppetlabs_spec/matchers.rb:8:in
alias_method': undefined method
should' for module `RSpec::Matchers::BlockAliases' (NameError)from /Library/Ruby/Gems/1.8/gems/puppetlabs_spec_helper-0.1.0/lib/puppetlabs_spec_helper/puppetlabs_spec/matchers.rb:8
...