mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Add VariableNames
test for method with multiple instance vars
This commit is contained in:
parent
01dfcbe76a
commit
d06812ea8e
1 changed files with 11 additions and 0 deletions
|
@ -43,6 +43,17 @@ module Ameba
|
|||
CRYSTAL
|
||||
end
|
||||
|
||||
it "reports method with multiple instance variables" do
|
||||
expect_issue subject, <<-CRYSTAL
|
||||
class Location
|
||||
def at(@startLocation = nil, @endLocation = nil)
|
||||
# ^ error: Var name should be underscore-cased: @start_location, not @startLocation
|
||||
# ^ error: Var name should be underscore-cased: @end_location, not @endLocation
|
||||
end
|
||||
end
|
||||
CRYSTAL
|
||||
end
|
||||
|
||||
it "reports class variable name" do
|
||||
expect_issue subject, <<-CRYSTAL
|
||||
class Greeting
|
||||
|
|
Loading…
Reference in a new issue