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 - superclass mismatch for class AddModelVirtualAttributeReview #284

Open
mberrueta opened this issue Dec 6, 2016 · 2 comments
Open

Comments

@mberrueta
Copy link

Hello all,
Using Rspec with rails_best_practice I have the superclass mismatch error

I have a class that load all the required things ( a helper ) and Inside this, there is rails_best_practices included.

If I run rails_best_practices directly it works
If I run rspec without the include, it also works

but when I run rspec with the include I get

$ rspec               
/home/matt/.rvm/gems/ruby-2.3.2/gems/rails_best_practices-1.17.0/lib/rails_best_practices/reviews/add_model_virtual_attribute_review.rb:16:in `<module:Reviews>': superclass mismatch for class AddModelVirtualAttributeReview (TypeError)
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/rails_best_practices-1.17.0/lib/rails_best_practices/reviews/add_model_virtual_attribute_review.rb:3:in `<module:RailsBestPractices>'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/rails_best_practices-1.17.0/lib/rails_best_practices/reviews/add_model_virtual_attribute_review.rb:2:in `<top (required)>'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/require_all-1.3.3/lib/require_all.rb:108:in `require'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/require_all-1.3.3/lib/require_all.rb:108:in `block in require_all'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/require_all-1.3.3/lib/require_all.rb:106:in `each'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/require_all-1.3.3/lib/require_all.rb:106:in `require_all'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/require_all-1.3.3/lib/require_all.rb:153:in `block in require_rel'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/require_all-1.3.3/lib/require_all.rb:152:in `each'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/require_all-1.3.3/lib/require_all.rb:152:in `require_rel'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/rails_best_practices-1.17.0/lib/rails_best_practices/reviews.rb:2:in `<top (required)>'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/rails_best_practices-1.17.0/lib/rails_best_practices.rb:9:in `<top (required)>'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
        from /home/matt/code/muse/muse-api/lib/tasks/ci.rake:8:in `<top (required)>'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:287:in `load'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:287:in `block in load'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:287:in `load'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/railties-5.0.0.1/lib/rails/engine.rb:654:in `block in run_tasks_blocks'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/railties-5.0.0.1/lib/rails/engine.rb:654:in `each'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/railties-5.0.0.1/lib/rails/engine.rb:654:in `run_tasks_blocks'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/railties-5.0.0.1/lib/rails/application.rb:443:in `run_tasks_blocks'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/railties-5.0.0.1/lib/rails/engine.rb:457:in `load_tasks'
        from /home/matt/code/muse/muse-api/spec/rails_helper.rb:13:in `<top (required)>'
        from /home/matt/code/muse/muse-api/spec/models/profile_spec.rb:1:in `require'
        from /home/matt/code/muse/muse-api/spec/models/profile_spec.rb:1:in `<top (required)>'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/rspec-core-3.5.4/lib/rspec/core/configuration.rb:1435:in `load'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/rspec-core-3.5.4/lib/rspec/core/configuration.rb:1435:in `block in load_spec_files'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/rspec-core-3.5.4/lib/rspec/core/configuration.rb:1433:in `each'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/rspec-core-3.5.4/lib/rspec/core/configuration.rb:1433:in `load_spec_files'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/rspec-core-3.5.4/lib/rspec/core/runner.rb:100:in `setup'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/rspec-core-3.5.4/lib/rspec/core/runner.rb:86:in `run'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/rspec-core-3.5.4/lib/rspec/core/runner.rb:71:in `run'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/rspec-core-3.5.4/lib/rspec/core/runner.rb:45:in `invoke'
        from /home/matt/.rvm/gems/ruby-2.3.2/gems/rspec-core-3.5.4/exe/rspec:4:in `<top (required)>'
        from /home/matt/.rvm/gems/ruby-2.3.2/bin/rspec:22:in `load'
        from /home/matt/.rvm/gems/ruby-2.3.2/bin/rspec:22:in `<main>'
        from /home/matt/.rvm/gems/ruby-2.3.2/bin/ruby_executable_hooks:15:in `eval'
        from /home/matt/.rvm/gems/ruby-2.3.2/bin/ruby_executable_hooks:15:in `<main>'

rails_best_practices (1.17.0)
rspec (3.5.0)

Any idea?

@flyerhzm
Copy link
Owner

@mberrueta sorry, I can't reproduce it.

@mberrueta
Copy link
Author

mberrueta commented Dec 15, 2016

I will try again, thanks anyway :)

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

2 participants