mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
20 lines
452 B
Crystal
20 lines
452 B
Crystal
|
require "../../../spec_helper"
|
||
|
|
||
|
module Ameba::Rule::Performance
|
||
|
describe Base do
|
||
|
subject = PerfRule.new
|
||
|
|
||
|
describe "#catch" do
|
||
|
it "ignores spec files" do
|
||
|
source = Source.new("", "source_spec.cr")
|
||
|
subject.catch(source).should be_valid
|
||
|
end
|
||
|
|
||
|
it "reports perf issues for non-spec files" do
|
||
|
source = Source.new("", "source.cr")
|
||
|
subject.catch(source).should_not be_valid
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|