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

RSpec 3.0.0 breaks rspec-puppet #200

Closed
treydock opened this issue Jun 2, 2014 · 1 comment · Fixed by #201
Closed

RSpec 3.0.0 breaks rspec-puppet #200

treydock opened this issue Jun 2, 2014 · 1 comment · Fixed by #201
Milestone

Comments

@treydock
Copy link
Contributor

treydock commented Jun 2, 2014

RSpec 3.0.0 was released yesterday and it breaks rspec-puppet.

I enabled backtrace and pushed my puppet module to run in Travis-CI , here is one of the failed tests, https://travis-ci.org/treydock/puppet-osg/jobs/26588391.

For now rspec-puppet should probably require rspec <3.0.0.

Here is one error's backtraces:

  1) osg should contain Class[osg]
     Failure/Error: it { should create_class('osg') }
     NoMethodError:
       undefined method `display_name' for RSpec::ExampleGroups::Osg:Class
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/bundler/gems/rspec-puppet-389f99ef6665/lib/rspec-puppet/support.rb:18:in `load_catalogue'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/bundler/gems/rspec-puppet-389f99ef6665/lib/rspec-puppet/example/class_example_group.rb:7:in `catalogue'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/bundler/gems/rspec-puppet-389f99ef6665/lib/rspec-puppet/support.rb:7:in `block in subject'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/bundler/gems/rspec-puppet-389f99ef6665/lib/rspec-puppet/matchers/create_generic.rb:82:in `call'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/bundler/gems/rspec-puppet-389f99ef6665/lib/rspec-puppet/matchers/create_generic.rb:82:in `matches?'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/gems/rspec-expectations-3.0.0/lib/rspec/matchers/matcher_delegator.rb:13:in `method_missing'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/gems/rspec-expectations-3.0.0/lib/rspec/expectations/handler.rb:49:in `handle_matcher'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/gems/rspec-core-3.0.0/lib/rspec/core/memoized_helpers.rb:81:in `should'
     # ./spec/classes/osg_spec.rb:8:in `block (2 levels) in <top (required)>'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/gems/rspec-core-3.0.0/lib/rspec/core/example.rb:148:in `instance_exec'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/gems/rspec-core-3.0.0/lib/rspec/core/example.rb:148:in `block in run'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/gems/rspec-core-3.0.0/lib/rspec/core/example.rb:299:in `with_around_example_hooks'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/gems/rspec-core-3.0.0/lib/rspec/core/example.rb:145:in `run'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/gems/rspec-core-3.0.0/lib/rspec/core/example_group.rb:494:in `block in run_examples'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/gems/rspec-core-3.0.0/lib/rspec/core/example_group.rb:490:in `map'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/gems/rspec-core-3.0.0/lib/rspec/core/example_group.rb:490:in `run_examples'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/gems/rspec-core-3.0.0/lib/rspec/core/example_group.rb:457:in `run'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/gems/rspec-core-3.0.0/lib/rspec/core/runner.rb:112:in `block (2 levels) in run_specs'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/gems/rspec-core-3.0.0/lib/rspec/core/runner.rb:112:in `map'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/gems/rspec-core-3.0.0/lib/rspec/core/runner.rb:112:in `block in run_specs'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/gems/rspec-core-3.0.0/lib/rspec/core/reporter.rb:54:in `report'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/gems/rspec-core-3.0.0/lib/rspec/core/runner.rb:108:in `run_specs'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/gems/rspec-core-3.0.0/lib/rspec/core/runner.rb:86:in `run'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/gems/rspec-core-3.0.0/lib/rspec/core/runner.rb:70:in `run'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/gems/rspec-core-3.0.0/lib/rspec/core/runner.rb:38:in `invoke'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/gems/rspec-core-3.0.0/exe/rspec:4:in `<top (required)>'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/bin/rspec:23:in `load'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/bin/rspec:23:in `<main>'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/bin/ruby_executable_hooks:15:in `eval'
     # /Users/treydock/.rvm/gems/ruby-1.9.3-p429@puppet_dev/bin/ruby_executable_hooks:15:in `<main>'

With --deprecation-out .rspec.errors I get the following entries

The `:example_group` key in an example group's metadata hash is deprecated. Use the example group's hash directly for the computed keys and `:parent_example_group` to access the parent example group metadata instead. Called from /Users/treydock/puppet/modules/osg/spec/classes/osg_spec.rb:3:in `<top (required)>'.
--------------------------------------------------------------------------------
RSpec::Puppet::ManifestMatchers::CreateGeneric implements a legacy RSpec matcher
protocol. For the current protocol you should expose the failure messages
via the `failure_message` and `failure_message_when_negated` methods.
(Used from /Users/treydock/puppet/modules/osg/spec/classes/osg_spec.rb:8:in `block (2 levels) in <top (required)>')
--------------------------------------------------------------------------------
treydock added a commit to treydock/rspec-puppet that referenced this issue Jun 2, 2014
stepanstipl added a commit to stepanstipl/puppet-inifile that referenced this issue Jun 2, 2014
@treydock
Copy link
Contributor Author

treydock commented Jun 2, 2014

Duplicate of #198

treydock added a commit to treydock/rspec-puppet that referenced this issue Jun 2, 2014
* Fix deprecation warnings related to 'display_name', fixes rodjek#198
javiplx pushed a commit to javiplx/rspec-puppet that referenced this issue Aug 4, 2014
* Fix deprecation warnings related to 'display_name', fixes rodjek#198
javiplx pushed a commit to javiplx/rspec-puppet that referenced this issue Aug 4, 2014
* Fix deprecation warnings related to 'display_name', fixes rodjek#198
arusso pushed a commit to ucbpi/puppet-apache that referenced this issue Sep 19, 2014
gerhardsam added a commit to gerhardsam/puppet-rpmbuild that referenced this issue Feb 25, 2015
gerhardsam added a commit to gerhardsam/puppet-rpmbuild that referenced this issue Feb 25, 2015
@rodjek rodjek added this to the 2.0.0 milestone Sep 29, 2017
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

Successfully merging a pull request may close this issue.

2 participants