shard-ameba/spec/ameba/rule/performance/base_spec.cr
2021-04-18 09:39:55 +03:00

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