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 describe LiteralInInterpolation do
it "passes with good interpolation examples" do it "passes with good interpolation examples" do
s = Source.new %q( expect_no_issues subject, <<-CRYSTAL
name = "Ary" name = "Ary"
"Hello, #{name}" "Hello, #{name}"
"#{name}" "#{name}"
"Name size: #{name.size}" "Name size: #{name.size}"
) CRYSTAL
subject.catch(s).should be_valid
end end
it "fails if there is useless interpolation" do it "fails if there is useless interpolation" do