Add --no-color cli flag

closes #72
This commit is contained in:
Vitalii Elenhaupt 2018-08-13 00:04:39 +03:00
parent 248c5a656b
commit d60aea102f
No known key found for this signature in database
GPG key ID: 7558EF3A4056C706
3 changed files with 18 additions and 2 deletions

View file

@ -57,6 +57,16 @@ module Ameba::Cli
c.formatter.should eq :todo
end
it "accepts --no-color flag" do
c = Cli.parse_args %w(--no-color)
c.colors?.should be_false
end
it "doesn't disable colors by default" do
c = Cli.parse_args %w(--all)
c.colors?.should be_true
end
it "ignores --config if --gen-config flag passed" do
c = Cli.parse_args %w(--gen-config --config my_config.yml)
c.formatter.should eq :todo