mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Fix specs against Crystal nightly
This commit is contained in:
parent
aceb054aa0
commit
db59b23f9b
3 changed files with 6 additions and 6 deletions
|
@ -44,7 +44,7 @@ module Ameba::Rule::Lint
|
|||
foo = 1
|
||||
|
||||
-> (foo : Int32) {}
|
||||
# ^ error: Shadowing outer local variable `foo`
|
||||
# ^^^^^^^^^^^ error: Shadowing outer local variable `foo`
|
||||
end
|
||||
CRYSTAL
|
||||
end
|
||||
|
@ -69,7 +69,7 @@ module Ameba::Rule::Lint
|
|||
3.times do |foo|
|
||||
# ^ error: Shadowing outer local variable `foo`
|
||||
-> (foo : Int32) { foo + 1 }
|
||||
# ^ error: Shadowing outer local variable `foo`
|
||||
# ^^^^^^^^^^^ error: Shadowing outer local variable `foo`
|
||||
end
|
||||
CRYSTAL
|
||||
end
|
||||
|
|
|
@ -115,12 +115,12 @@ module Ameba::Rule::Lint
|
|||
|
||||
first.rule.should_not be_nil
|
||||
first.location.to_s.should eq "source_spec.cr:1:11"
|
||||
first.end_location.to_s.should eq ""
|
||||
first.end_location.to_s.should eq "source_spec.cr:1:21"
|
||||
first.message.should eq "Focused spec item detected"
|
||||
|
||||
second.rule.should_not be_nil
|
||||
second.location.to_s.should eq "source_spec.cr:2:13"
|
||||
second.end_location.to_s.should eq ""
|
||||
second.end_location.to_s.should eq "source_spec.cr:2:23"
|
||||
second.message.should eq "Focused spec item detected"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -52,7 +52,7 @@ module Ameba::Rule::Lint
|
|||
it "reports if proc argument is unused" do
|
||||
source = expect_issue subject, <<-CRYSTAL
|
||||
-> (a : Int32, b : String) do
|
||||
# ^ error: Unused argument `b`. If it's necessary, use `_b` as an argument name to indicate that it won't be used.
|
||||
# ^^^^^^^^^^ error: Unused argument `b`. If it's necessary, use `_b` as an argument name to indicate that it won't be used.
|
||||
a = a + 1
|
||||
end
|
||||
CRYSTAL
|
||||
|
@ -306,7 +306,7 @@ module Ameba::Rule::Lint
|
|||
|
||||
expect_issue rule, <<-CRYSTAL
|
||||
->(a : Int32) {}
|
||||
# ^ error: Unused argument `a`. If it's necessary, use `_a` as an argument name to indicate that it won't be used.
|
||||
# ^^^^^^^^^ error: Unused argument `a`. If it's necessary, use `_a` as an argument name to indicate that it won't be used.
|
||||
CRYSTAL
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue