Add missed spec case for files outside spec/ folder

This commit is contained in:
Sijawusz Pur Rahnama 2024-03-09 22:38:23 +01:00
parent e2d6c69039
commit a2c9aa67cc

View file

@ -4,6 +4,11 @@ module Ameba::Rule::Lint
subject = SpecFilename.new
describe SpecFilename do
it "passes if relative file path does not start with `spec/`" do
expect_no_issues subject, code: "", path: "src/spec/foo.cr"
expect_no_issues subject, code: "", path: "src/spec/foo/bar.cr"
end
it "passes if filename is correct" do
expect_no_issues subject, code: "", path: "spec/foo_spec.cr"
expect_no_issues subject, code: "", path: "spec/foo/bar_spec.cr"