mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
9e2d4f1856
closes #220
19 lines
452 B
Crystal
19 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
|