mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
parent
c12b4f1aa5
commit
e1b51f62a5
4 changed files with 21 additions and 4 deletions
|
@ -55,10 +55,10 @@ module Ameba::Rule
|
|||
rule.excluded?(Source.new "", "source.cr").should be_true
|
||||
end
|
||||
|
||||
pending "returns true if source matches the wildcard" do
|
||||
it "returns true if source matches the wildcard" do
|
||||
rule = DummyRule.new
|
||||
rule.excluded = %w(**/*.cr)
|
||||
rule.excluded?(Source.new "", "source.cr").should be_true
|
||||
rule.excluded?(Source.new "", __FILE__).should be_true
|
||||
end
|
||||
|
||||
it "returns false if source does not match the wildcard" do
|
||||
|
|
|
@ -35,5 +35,17 @@ module Ameba
|
|||
s.fullpath.should_not be_nil
|
||||
end
|
||||
end
|
||||
|
||||
describe "#matches_path?" do
|
||||
it "returns true if source's path is matched" do
|
||||
s = Source.new "", "source.cr"
|
||||
s.matches_path?("source.cr").should be_true
|
||||
end
|
||||
|
||||
it "returns false if source's path is not matched" do
|
||||
s = Source.new "", "source.cr"
|
||||
s.matches_path?("new_source.cr").should be_false
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue