Use issue expectation helpers in Lint::LiteralInInterpolation rule spec

This commit is contained in:
Sijawusz Pur Rahnama 2022-04-04 21:16:48 +02:00
parent 7f85434c85
commit 18316eaa8b

View file

@ -5,15 +5,14 @@ module Ameba::Rule::Lint
describe LiteralInInterpolation do
it "passes with good interpolation examples" do
s = Source.new %q(
expect_no_issues subject, <<-CRYSTAL
name = "Ary"
"Hello, #{name}"
"#{name}"
"Name size: #{name.size}"
)
subject.catch(s).should be_valid
CRYSTAL
end
it "fails if there is useless interpolation" do