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 v 3 deprecation #620

Closed
Dkendal opened this issue May 22, 2014 · 4 comments
Closed

Rspec v 3 deprecation #620

Dkendal opened this issue May 22, 2014 · 4 comments

Comments

@Dkendal
Copy link

Dkendal commented May 22, 2014

see rspec/rspec-rails#1035

@Dkendal
Copy link
Author

Dkendal commented May 22, 2014

I successfully upgraded to rspec rails 2.99 smootly (Dkendal@de23ce4).. however I'm getting trouble bumping to 3.0.0

/home/dkendal/src/draper/vendor/bundle/gems/activesupport-4.0.5/lib/active_support/inflector/methods.rb:228:in `const_get': uninitialized constant Other (NameError)
    from /home/dkendal/src/draper/vendor/bundle/gems/activesupport-4.0.5/lib/active_support/inflector/methods.rb:228:in `block in constantize'
    from /home/dkendal/src/draper/vendor/bundle/gems/activesupport-4.0.5/lib/active_support/inflector/methods.rb:224:in `each'
    from /home/dkendal/src/draper/vendor/bundle/gems/activesupport-4.0.5/lib/active_support/inflector/methods.rb:224:in `inject'
    from /home/dkendal/src/draper/vendor/bundle/gems/activesupport-4.0.5/lib/active_support/inflector/methods.rb:224:in `constantize'
    from /home/dkendal/src/draper/vendor/bundle/gems/activesupport-4.0.5/lib/active_support/core_ext/string/inflections.rb:66:in `constantize'
    from /home/dkendal/src/draper/lib/draper/decorator.rb:253:in `inferred_object_class'
    from /home/dkendal/src/draper/lib/draper/decorator.rb:69:in `object_class'
    from /home/dkendal/src/draper/lib/draper/decorator.rb:74:in `object_class?'
    from /home/dkendal/src/draper/lib/draper/decorator.rb:243:in `alias_object_to_object_class_name'
    from /home/dkendal/src/draper/lib/draper/decorator.rb:238:in `inherited'
    from /home/dkendal/src/draper/spec/spec_helper.rb:31:in `<module:Namespaced>'
    from /home/dkendal/src/draper/spec/spec_helper.rb:27:in `<top (required)>'
    from /home/dkendal/src/draper/spec/draper/collection_decorator_spec.rb:1:in `require'
    from /home/dkendal/src/draper/spec/draper/collection_decorator_spec.rb:1:in `<top (required)>'
    from /home/dkendal/src/draper/vendor/bundle/gems/rspec-core-3.0.0.rc1/lib/rspec/core/configuration.rb:1051:in `load'
    from /home/dkendal/src/draper/vendor/bundle/gems/rspec-core-3.0.0.rc1/lib/rspec/core/configuration.rb:1051:in `block in load_spec_files'
    from /home/dkendal/src/draper/vendor/bundle/gems/rspec-core-3.0.0.rc1/lib/rspec/core/configuration.rb:1051:in `each'
    from /home/dkendal/src/draper/vendor/bundle/gems/rspec-core-3.0.0.rc1/lib/rspec/core/configuration.rb:1051:in `load_spec_files'
    from /home/dkendal/src/draper/vendor/bundle/gems/rspec-core-3.0.0.rc1/lib/rspec/core/runner.rb:97:in `setup'
    from /home/dkendal/src/draper/vendor/bundle/gems/rspec-core-3.0.0.rc1/lib/rspec/core/runner.rb:85:in `run'
    from /home/dkendal/src/draper/vendor/bundle/gems/rspec-core-3.0.0.rc1/lib/rspec/core/runner.rb:70:in `run'
    from /home/dkendal/src/draper/vendor/bundle/gems/rspec-core-3.0.0.rc1/lib/rspec/core/runner.rb:38:in `invoke'
    from /home/dkendal/src/draper/vendor/bundle/gems/rspec-core-3.0.0.rc1/exe/rspec:4:in `<main>'
/home/dkendal/.rubies/ruby-2.1.2/bin/ruby -I/home/dkendal/src/draper/vendor/bundle/gems/rspec-core-3.0.0.rc1/lib:/home/dkendal/src/draper/vendor/bundle/gems/rspec-support-3.0.0.rc1/lib -S /home/dkendal/src/draper/vendor/bundle/gems/rspec-core-3.0.0.rc1/exe/rspec spec/draper/collection_decorator_spec.rb spec/draper/decoratable/equality_spec.rb spec/draper/decoratable_spec.rb spec/draper/decorated_association_spec.rb spec/draper/decorates_assigned_spec.rb spec/draper/decorator_spec.rb spec/draper/factory_spec.rb spec/draper/finders_spec.rb spec/draper/helper_proxy_spec.rb spec/draper/lazy_helpers_spec.rb spec/draper/view_context/build_strategy_spec.rb spec/draper/view_context_spec.rb spec/draper/view_helpers_spec.rb failed

@steveklabnik
Copy link
Member

Hmm, that's weird.

@cpence
Copy link

cpence commented Jun 2, 2014

I'm not sure about the second error report in this bug (I've got a test suite on RSpec 3 with Draper and don't see that error), but the :example_group deprecation mentioned in rspec/rspec_raills#1035 should definitely be fixed, now that RSpec 3 is released. In lib/draper/test/rspec_integration.rb, the line that reads:

    config.include DecoratorExampleGroup, example_group: {file_path: %r{spec/decorators}}, type: :decorator

should now read

    config.include DecoratorExampleGroup, file_path: %r{spec/decorators}, type: :decorator

I'd make a PR, but I'm not sure whether or not that's a breaking change against RSpec 2.*.

@steveklabnik
Copy link
Member

This was fixed with #623

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