Test generated boolean rule property

This commit is contained in:
Sijawusz Pur Rahnama 2022-11-22 19:53:27 +01:00
parent 9f670c09b5
commit 60813e4899
3 changed files with 6 additions and 0 deletions

View file

@ -32,6 +32,10 @@ module Ameba::Rule
subject.description.should_not be_nil
end
it "has a dummy? property" do
subject.dummy?.should be_true
end
it "has excluded property" do
subject.excluded.should be_nil
end

View file

@ -102,6 +102,7 @@ module Ameba
# Run `ameba --only Ameba/DummyRule` for details
Ameba/DummyRule:
Description: Dummy rule that does nothing.
Dummy: true
Excluded:
- source1.cr
- source2.cr

View file

@ -7,6 +7,7 @@ module Ameba
class DummyRule < Rule::Base
properties do
description : String = "Dummy rule that does nothing."
dummy true
end
def test(source)