Fix few issues reported by the newly added rule

This commit is contained in:
Sijawusz Pur Rahnama 2022-10-30 18:15:00 +01:00
parent 67356f246b
commit eb64fde437
4 changed files with 12 additions and 10 deletions

View file

@ -86,8 +86,8 @@ module Ameba
s1.add_issue DummyRule.new, {2, 2}, "message1"
s2.add_issue DummyRule.new, {2, 2}, "message2"
file = formatter.finished([s1, s2])
content = File.read(file.not_nil!.path)
file = formatter.finished([s1, s2]).should_not be_nil
content = File.read(file.path)
content.should contain <<-CONTENT
# Problems found: 3
# Run `ameba --only Ameba/DummyRule` for details