mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
parent
4546b90b54
commit
6579c8f573
2 changed files with 7 additions and 0 deletions
|
@ -47,6 +47,12 @@ module Ameba::Cli
|
|||
c.formatter.should eq :todo
|
||||
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
|
||||
c.config.should eq ""
|
||||
end
|
||||
|
||||
it "accepts unknown args as files" do
|
||||
c = Cli.parse_args %w(source1.cr source2.cr)
|
||||
c.files.should eq %w(source1.cr source2.cr)
|
||||
|
|
|
@ -59,6 +59,7 @@ module Ameba::Cli
|
|||
parser.on("--gen-config",
|
||||
"Generate a configuration file acting as a TODO list") do
|
||||
opts.formatter = :todo
|
||||
opts.config = ""
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue