mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Test generated boolean rule property
This commit is contained in:
parent
9f670c09b5
commit
60813e4899
3 changed files with 6 additions and 0 deletions
|
@ -32,6 +32,10 @@ module Ameba::Rule
|
||||||
subject.description.should_not be_nil
|
subject.description.should_not be_nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "has a dummy? property" do
|
||||||
|
subject.dummy?.should be_true
|
||||||
|
end
|
||||||
|
|
||||||
it "has excluded property" do
|
it "has excluded property" do
|
||||||
subject.excluded.should be_nil
|
subject.excluded.should be_nil
|
||||||
end
|
end
|
||||||
|
|
|
@ -102,6 +102,7 @@ module Ameba
|
||||||
# Run `ameba --only Ameba/DummyRule` for details
|
# Run `ameba --only Ameba/DummyRule` for details
|
||||||
Ameba/DummyRule:
|
Ameba/DummyRule:
|
||||||
Description: Dummy rule that does nothing.
|
Description: Dummy rule that does nothing.
|
||||||
|
Dummy: true
|
||||||
Excluded:
|
Excluded:
|
||||||
- source1.cr
|
- source1.cr
|
||||||
- source2.cr
|
- source2.cr
|
||||||
|
|
|
@ -7,6 +7,7 @@ module Ameba
|
||||||
class DummyRule < Rule::Base
|
class DummyRule < Rule::Base
|
||||||
properties do
|
properties do
|
||||||
description : String = "Dummy rule that does nothing."
|
description : String = "Dummy rule that does nothing."
|
||||||
|
dummy true
|
||||||
end
|
end
|
||||||
|
|
||||||
def test(source)
|
def test(source)
|
||||||
|
|
Loading…
Reference in a new issue