shard-ameba/spec/ameba/base_spec.cr
2017-12-01 19:01:25 +02:00

32 lines
647 B
Crystal

require "../spec_helper"
module Ameba::Rule
struct NoProperties < Rule::Base
def test(source)
end
end
describe Base do
context "properties" do
subject = DummyRule.new
it "is enabled by default" do
subject.enabled.should be_true
end
it "has a description property" do
subject.description.should_not be_nil
end
it "has excluded property" do
subject.excluded.should be_nil
end
end
describe "when a rule does not have defined properties" do
it "is enabled by default" do
NoProperties.new.enabled.should be_true
end
end
end
end