Skip to content
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

Missing dependency for spec tests. #9

Closed
irgeek opened this issue Mar 22, 2017 · 3 comments
Closed

Missing dependency for spec tests. #9

irgeek opened this issue Mar 22, 2017 · 3 comments

Comments

@irgeek
Copy link
Contributor

irgeek commented Mar 22, 2017

If you clone this repo and attempt to run the spec tests, the tests cannot run due to a missing dependency:

temp $ git clone https://github.com/voxpupuli/puppet-lint-param-docs.git
Cloning into 'puppet-lint-param-docs'...
remote: Counting objects: 155, done.
remote: Total 155 (delta 0), reused 0 (delta 0), pack-reused 155
Receiving objects: 100% (155/155), 21.68 KiB | 0 bytes/s, done.
Resolving deltas: 100% (51/51), done.
Checking connectivity... done.
temp $ cd puppet-lint-param-docs/
puppet-lint-param-docs (master) $ bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 12.0.0
Using diff-lcs 1.3
Using puppet-lint 2.1.1
Using rspec-support 3.5.0
Using bundler 1.14.5
Using puppet-lint-param-docs 1.4.1 from source at `.`
Using rspec-core 3.5.4
Using rspec-expectations 3.5.0
Using rspec-mocks 3.5.0
Using rspec-collection_matchers 1.1.3
Using rspec-its 1.2.0
Using rspec 3.5.0
Bundle complete! 5 Gemfile dependencies, 12 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
puppet-lint-param-docs (master) $ bundle exec rake
/usr/local/Cellar/ruby/2.3.1/bin/ruby -I/usr/local/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/lib:/usr/local/lib/ruby/gems/2.3.0/gems/rspec-support-3.5.0/lib /usr/local/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
/usr/local/lib/ruby/gems/2.3.0/gems/puppet-lint-2.1.1/spec/spec_helper.rb:5:in `require': cannot load such file -- rspec/json_expectations (LoadError)
	from /usr/local/lib/ruby/gems/2.3.0/gems/puppet-lint-2.1.1/spec/spec_helper.rb:5:in `<top (required)>'
	from /usr/local/lib/ruby/gems/2.3.0/gems/puppet-lint-2.1.1/lib/puppet-lint/plugins.rb:28:in `load'
	from /usr/local/lib/ruby/gems/2.3.0/gems/puppet-lint-2.1.1/lib/puppet-lint/plugins.rb:28:in `load_spec_helper'
	from /Users/jsinclair/Development/temp/puppet-lint-param-docs/spec/spec_helper.rb:3:in `<top (required)>'
	from /Users/jsinclair/Development/temp/puppet-lint-param-docs/spec/puppet-lint/plugins/check_parameter_documentation_spec.rb:1:in `require'
	from /Users/jsinclair/Development/temp/puppet-lint-param-docs/spec/puppet-lint/plugins/check_parameter_documentation_spec.rb:1:in `<top (required)>'
	from /usr/local/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/lib/rspec/core/configuration.rb:1435:in `load'
	from /usr/local/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/lib/rspec/core/configuration.rb:1435:in `block in load_spec_files'
	from /usr/local/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/lib/rspec/core/configuration.rb:1433:in `each'
	from /usr/local/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/lib/rspec/core/configuration.rb:1433:in `load_spec_files'
	from /usr/local/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/lib/rspec/core/runner.rb:100:in `setup'
	from /usr/local/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/lib/rspec/core/runner.rb:86:in `run'
	from /usr/local/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/lib/rspec/core/runner.rb:71:in `run'
	from /usr/local/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/lib/rspec/core/runner.rb:45:in `invoke'
	from /usr/local/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/exe/rspec:4:in `<main>'
/usr/local/Cellar/ruby/2.3.1/bin/ruby -I/usr/local/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/lib:/usr/local/lib/ruby/gems/2.3.0/gems/rspec-support-3.5.0/lib /usr/local/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed

I'm guessing this happens because you're pulling in the puppet-lint spec helper in spec/spec_helper.rb:

PuppetLint::Plugins.load_spec_helper

I got around this by adding the missing gem to the Gemfile:

gem 'rspec-json_expectations', '~> 1.4'

I'm not sure if this is the right place to open this issue. If it's actually an issue in puppet-lint just let me know and I'll open it over there.

@rnelson0
Copy link
Sponsor Member

This is an issue with puppet-lint that began with 2.1.1, if you can file an issue there that would be great!

@domcleal
Copy link
Contributor

It appears to have been fixed in rodjek/puppet-lint@345b211, but awaiting release.

@irgeek
Copy link
Contributor Author

irgeek commented Mar 22, 2017

Awesome response time, folks. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants