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
For /private/tmp: Default configuration from /Users/me/.rvm/gems/ruby-2.4.2/gems/rubocop-1.6.1/config/default.yml
Inspecting 1 file
Scanning /private/tmp/test_spec.rb
Loading cache from /Users/me/.cache/rubocop_cache/0fe4423234f49f9a7a29f384c05d385bdc87c27f/6d7a3b621ca1730e04accd938619e4bdab66cfb1/cbd2ebc1b9a3baa10e15b9523bb86be7ea95cc25
W
Offenses:
test_spec.rb:7:5: W: Lint/UnreachableLoop: This loop will have at most one iteration.
SomeClass.should_receive(:test).exactly(2).times { raise StandardError }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1 file inspected, 1 offense detected
Finished in 0.10298199998214841 seconds
RuboCop version
$ rubocop -V
warning: parser/current is loading parser/ruby24, which recognizes
warning: 2.4.10-compliant syntax, but you are running 2.4.2.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
1.6.1 (using Parser 2.7.2.0, rubocop-ast 1.3.0, running on ruby 2.4.2 x86_64-darwin18)
The text was updated successfully, but these errors were encountered:
Expected behavior
rubocop should not identify this as an unreachable loop.
Actual behavior
rubocop identifies this as an unreachable loop.
Steps to reproduce the problem
test_spec.rb:
RuboCop version
The text was updated successfully, but these errors were encountered: