Skip to content

Commit

Permalink
Test: filter out warnings from the mail gem (#6)
Browse files Browse the repository at this point in the history
Co-authored-by: fatkodima <[email protected]>
  • Loading branch information
olleolleolle and fatkodima authored Nov 24, 2023
1 parent 58f1ee8 commit da8bd12
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ Style/FetchEnvVar:
Style/HashSyntax:
Enabled: false

Style/RegexpLiteral:
EnforcedStyle: slashes
AllowInnerSlashes: true

Lint/MissingSuper:
Enabled: false

Expand Down
14 changes: 14 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,17 @@ def run_check(name)
# Swallow everything to be able to test erroring checks.
self.error_handler = ->(error, context) {}
end

if defined?(Warning)
module TestRunWarningFilter
# Ignore warnings output from mail v2.8.1 gem.
def warn(message, category: nil, **kwargs)
if message =~ /gems\/mail-/
# ignore
else
super
end
end
end
Warning.extend TestRunWarningFilter
end

0 comments on commit da8bd12

Please sign in to comment.