Add --all cli flag that enables all available rules

This commit is contained in:
Vitalii Elenhaupt 2018-07-04 15:20:35 +03:00
parent 970ca4be1b
commit 248c5a656b
No known key found for this signature in database
GPG key ID: 7558EF3A4056C706
5 changed files with 25 additions and 8 deletions

View file

@ -42,6 +42,16 @@ module Ameba::Cli
c.except.should eq %w(RULE1 RULE2)
end
it "defaults all? flag to false" do
c = Cli.parse_args %w(file.cr)
c.all?.should eq false
end
it "accepts --all flag" do
c = Cli.parse_args %w(--all)
c.all?.should eq true
end
it "accepts --gen-config flag" do
c = Cli.parse_args %w(--gen-config)
c.formatter.should eq :todo