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

Undefined method method? with Minitest/AssertIncludes #56

Closed
Maimer opened this issue Feb 18, 2020 · 1 comment
Closed

Undefined method method? with Minitest/AssertIncludes #56

Maimer opened this issue Feb 18, 2020 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@Maimer
Copy link

Maimer commented Feb 18, 2020

Expected behavior

After updating to the latest version of rubocop 0.80.0 and rubocop-minitest 0.6.1 I receive an error when running rubocop that says it is usually caused by RuboCop bugs. I expect it to pass the checks with no errors.

Actual behavior

I ran bundle exec rubocop and received the following error:

An error occurred while Minitest/AssertIncludes cop was inspecting <FILE>.
undefined method `method?' for s(:lvar, :yielded):RuboCop::AST::Node
Did you mean?  method
               methods
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-minitest-0.6.1/lib/rubocop/cop/mixin/includes_cop_rule.rb:16:in `on_send'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/cop/commissioner.rb:57:in `block (2 levels) in trigger_responding_cops'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/cop/commissioner.rb:136:in `with_cop_error_handling'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/cop/commissioner.rb:56:in `block in trigger_responding_cops'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/cop/commissioner.rb:55:in `each'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/cop/commissioner.rb:55:in `trigger_responding_cops'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/cop/commissioner.rb:32:in `block (2 levels) in <class:Commissioner>'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/ast/traversal.rb:57:in `block in on_begin'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/ast/traversal.rb:57:in `each'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/ast/traversal.rb:57:in `on_begin'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/cop/commissioner.rb:33:in `block (2 levels) in <class:Commissioner>'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/ast/traversal.rb:107:in `on_def'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/cop/commissioner.rb:33:in `block (2 levels) in <class:Commissioner>'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/ast/traversal.rb:57:in `block in on_begin'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/ast/traversal.rb:57:in `each'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/ast/traversal.rb:57:in `on_begin'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/cop/commissioner.rb:33:in `block (2 levels) in <class:Commissioner>'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/ast/traversal.rb:99:in `on_class'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/cop/commissioner.rb:33:in `block (2 levels) in <class:Commissioner>'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/ast/traversal.rb:157:in `on_while'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/cop/commissioner.rb:33:in `block (2 levels) in <class:Commissioner>'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/ast/traversal.rb:157:in `on_while'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/cop/commissioner.rb:33:in `block (2 levels) in <class:Commissioner>'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/ast/traversal.rb:57:in `block in on_begin'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/ast/traversal.rb:57:in `each'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/ast/traversal.rb:57:in `on_begin'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/cop/commissioner.rb:33:in `block (2 levels) in <class:Commissioner>'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/ast/traversal.rb:14:in `walk'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/cop/commissioner.rb:44:in `investigate'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/cop/team.rb:124:in `investigate'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/cop/team.rb:112:in `offenses'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/cop/team.rb:44:in `inspect_file'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/runner.rb:296:in `inspect_file'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/runner.rb:244:in `block in do_inspection_loop'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/runner.rb:276:in `block in iterate_until_no_changes'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/runner.rb:269:in `loop'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/runner.rb:269:in `iterate_until_no_changes'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/runner.rb:240:in `do_inspection_loop'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/runner.rb:119:in `block in file_offenses'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/runner.rb:143:in `file_offense_cache'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/runner.rb:117:in `file_offenses'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/runner.rb:108:in `process_file'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/runner.rb:87:in `block in each_inspected_file'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/runner.rb:86:in `each'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/runner.rb:86:in `reduce'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/runner.rb:86:in `each_inspected_file'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/runner.rb:73:in `inspect_files'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/runner.rb:39:in `run'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/cli/command/execute_runner.rb:21:in `execute_runner'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/cli/command/execute_runner.rb:13:in `run'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/cli/command.rb:10:in `run'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/cli/environment.rb:17:in `run'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/cli.rb:65:in `run_command'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/cli.rb:72:in `execute_runners'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/lib/rubocop/cli.rb:41:in `run'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/exe/rubocop:13:in `block in <top (required)>'
/Users/maimer/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
/Users/maimer/.rvm/gems/ruby-2.6.3/gems/rubocop-0.80.0/exe/rubocop:12:in `<top (required)>'
/Users/maimer/.rvm/gems/ruby-2.6.3/bin/rubocop:23:in `load'
/Users/maimer/.rvm/gems/ruby-2.6.3/bin/rubocop:23:in `<main>'
/Users/maimer/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `eval'
/Users/maimer/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `<main>'

Steps to reproduce the problem

Install rubocop 0.80.0 and rubocop-minitest 0.6.1 and run bundle exec rubocop

RuboCop version

0.80.0 (using Parser 2.7.0.2, running on ruby 2.6.3 x86_64-darwin19)

See this issue on rubocop-minitest as well: #55

@koic koic transferred this issue from rubocop/rubocop Feb 19, 2020
@koic koic added the duplicate This issue or pull request already exists label Feb 19, 2020
@koic
Copy link
Member

koic commented Feb 19, 2020

This issue is the same as #55 and will be solved in #57. Thanks!

@koic koic closed this as completed Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants