Fix specs on Crystal nightly (soon to be v1.7.0)

This commit is contained in:
Sijawusz Pur Rahnama 2022-12-21 16:23:36 +01:00
parent a091af14a8
commit d31e41b8a7
10 changed files with 21 additions and 21 deletions

View file

@ -17,7 +17,7 @@ module Ameba::Rule::Lint
require "big"
require "math"
require "big"
# ^{} error: Duplicated require of `big`
# ^^^^^^^^^^^ error: Duplicated require of `big`
CRYSTAL
expect_no_corrections source

View file

@ -77,7 +77,7 @@ module Ameba::Rule::Lint
issue = s.issues.first
issue.rule.should_not be_nil
issue.location.to_s.should eq "source.cr:2:19"
issue.end_location.to_s.should eq "source.cr:2:29"
issue.end_location.to_s.should eq "source.cr:2:28"
issue.message.should eq "Remove redundant with_index"
end
end
@ -155,7 +155,7 @@ module Ameba::Rule::Lint
issue = s.issues.first
issue.rule.should_not be_nil
issue.location.to_s.should eq "source.cr:2:14"
issue.end_location.to_s.should eq "source.cr:2:29"
issue.end_location.to_s.should eq "source.cr:2:28"
issue.message.should eq "Use each instead of each_with_index"
end
end

View file

@ -76,7 +76,7 @@ module Ameba::Rule::Lint
issue = s.issues.first
issue.rule.should_not be_nil
issue.location.to_s.should eq "source.cr:2:14"
issue.end_location.to_s.should eq "source.cr:2:30"
issue.end_location.to_s.should eq "source.cr:2:29"
issue.message.should eq "Use `each` instead of `each_with_object`"
end
end