mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Utilize Source#spec?
This commit is contained in:
parent
ecad80a96b
commit
f8c22a6e77
3 changed files with 19 additions and 2 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue