You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minitest-power_assert extends the #assert method, which would accept a block without arguments:
assert{1 + 2 == 3}
While this is not valid code in plain minitest and it is expected to either emit or not emit some warnings, RuboCop warns it in a rather surprising way.
Actual behavior
An error occurred while Minitest/AssertEmpty cop was inspecting /.../test/foo.rb:1:0.
undefined method `begin_type?' for nil:NilClass
/.../gems/rubocop-minitest-0.10.1/lib/rubocop/cop/mixin/minitest_cop_rule.rb:59:in `peel_redundant_parentheses_from'
/.../gems/rubocop-minitest-0.10.1/lib/rubocop/cop/mixin/minitest_cop_rule.rb:34:in `on_send'
/.../gems/rubocop-1.5.2/lib/rubocop/cop/commissioner.rb:100:in `public_send'
/.../gems/rubocop-1.5.2/lib/rubocop/cop/commissioner.rb:100:in `block (2 levels) in trigger_responding_cops'
/.../gems/rubocop-1.5.2/lib/rubocop/cop/commissioner.rb:166:in `with_cop_error_handling'
6 errors occurred:
An error occurred while Minitest/AssertEmpty cop was inspecting /.../test/foo.rb:1:0.
An error occurred while Minitest/AssertEqual cop was inspecting /.../test/foo.rb:1:0.
An error occurred while Minitest/AssertIncludes cop was inspecting /.../test/foo.rb:1:0.
An error occurred while Minitest/AssertInstanceOf cop was inspecting /.../test/foo.rb:1:0.
An error occurred while Minitest/AssertMatch cop was inspecting /.../test/foo.rb:1:0.
An error occurred while Minitest/AssertRespondTo cop was inspecting /.../test/foo.rb:1:0.
Errors are usually caused by RuboCop bugs.
Please, report your problems to RuboCop's issue tracker.
https://github.com/rubocop-hq/rubocop/issues
Steps to reproduce the problem
Inside a project configured to use rubocop-minitest, create a file test/foo.rb with content:
Expected behavior
minitest-power_assert extends the
#assert
method, which would accept a block without arguments:While this is not valid code in plain minitest and it is expected to either emit or not emit some warnings, RuboCop warns it in a rather surprising way.
Actual behavior
Steps to reproduce the problem
Inside a project configured to use rubocop-minitest, create a file
test/foo.rb
with content:Then run:
RuboCop version
The text was updated successfully, but these errors were encountered: