Fix rubocop offenses - Requires Ruby 3.1+

This commit is contained in:
Sebastian Serth
2022-11-25 10:53:14 +01:00
parent bdf474e684
commit 574e99eddd
93 changed files with 315 additions and 315 deletions

View File

@ -1,8 +1,8 @@
# frozen_string_literal: true
class MochaAdapter < TestingFrameworkAdapter
SUCCESS_REGEXP = /(\d+) passing/.freeze
FAILURES_REGEXP = /(\d+) failing/.freeze
SUCCESS_REGEXP = /(\d+) passing/
FAILURES_REGEXP = /(\d+) failing/
def self.framework_name
'Mocha'
@ -11,6 +11,6 @@ class MochaAdapter < TestingFrameworkAdapter
def parse_output(output)
success = output[:stdout].scan(SUCCESS_REGEXP).try(:last).try(:first).try(:to_i) || 0
failed = output[:stdout].scan(FAILURES_REGEXP).try(:last).try(:first).try(:to_i) || 0
{count: success + failed, failed: failed}
{count: success + failed, failed:}
end
end