Skip macro code in Style/IsAFilter rule

This commit is contained in:
Sijawusz Pur Rahnama 2021-04-04 11:19:45 +02:00
parent 6aaf398c43
commit 8d21733b10
2 changed files with 11 additions and 2 deletions

View file

@ -38,11 +38,11 @@ module Ameba::Rule::Style
end
context "macro" do
it "reports in macro scope" do
it "doesn't report in macro scope" do
source = Source.new %(
{{ [1, 2, nil].reject(&.nil?) }}
)
subject.catch(source).should_not be_valid
subject.catch(source).should be_valid
end
end