Utilize Source#spec?

This commit is contained in:
Vitalii Elenhaupt 2021-02-03 17:14:03 +02:00
parent ecad80a96b
commit f8c22a6e77
No known key found for this signature in database
GPG key ID: CD0BF17825928BC0
3 changed files with 19 additions and 2 deletions

View file

@ -23,6 +23,18 @@ module Ameba
end
end
describe "#spec?" do
it "returns true if the source is a spec file" do
s = Source.new "", "./source_spec.cr"
s.spec?.should be_true
end
it "returns false if the source is not a spec file" do
s = Source.new "", "./source.cr"
s.spec?.should be_false
end
end
describe "#matches_path?" do
it "returns true if source's path is matched" do
s = Source.new "", "source.cr"