mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Use issue expectation helpers in Lint::LiteralInInterpolation
rule spec
This commit is contained in:
parent
7f85434c85
commit
18316eaa8b
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue