@@ -32,44 +32,44 @@ formatter = Cling::Formatter.new
3232describe Cling ::Formatter do
3333 it " generates a help template" do
3434 formatter.generate(command).chomp.should eq <<-HELP
35- Greets a person
35+ Greets a person
3636
37- Usage:
38- \t greet <arguments> [options]
37+ Usage:
38+ \t greet <arguments> [options]
3939
40- Commands:
41- \t welcome sends a friendly welcome message
40+ Commands:
41+ \t welcome sends a friendly welcome message
4242
43- Arguments:
44- \t name the name of the person (required)
43+ Arguments:
44+ \t name the name of the person (required)
4545
46- Options:
47- \t -h, --help sends help information
48- \t -v, --version sends the app version
49- \t -c, --caps greet with caps
50- HELP
46+ Options:
47+ \t -h, --help sends help information
48+ \t -v, --version sends the app version
49+ \t -c, --caps greet with caps
50+ HELP
5151 end
5252
5353 it " generates with a custom delimiter" do
5454 formatter.options.option_delim = '+'
5555
5656 formatter.generate(command).chomp.should eq <<-HELP
57- Greets a person
57+ Greets a person
5858
59- Usage:
60- \t greet <arguments> [options]
59+ Usage:
60+ \t greet <arguments> [options]
6161
62- Commands:
63- \t welcome sends a friendly welcome message
62+ Commands:
63+ \t welcome sends a friendly welcome message
6464
65- Arguments:
66- \t name the name of the person (required)
65+ Arguments:
66+ \t name the name of the person (required)
6767
68- Options:
69- \t +h, ++help sends help information
70- \t +v, ++version sends the app version
71- \t +c, ++caps greet with caps
72- HELP
68+ Options:
69+ \t +h, ++help sends help information
70+ \t +v, ++version sends the app version
71+ \t +c, ++caps greet with caps
72+ HELP
7373 end
7474
7575 it " generates a description section" do
@@ -96,11 +96,11 @@ describe Cling::Formatter do
9696 String .build do |io |
9797 formatter.format_options(command, io)
9898 end .chomp.should eq <<-HELP
99- Options:
100- \t -h, --help sends help information
101- \t -v, --version sends the app version
102- \t -c, --caps greet with caps
99+ Options:
100+ \t -h, --help sends help information
101+ \t -v, --version sends the app version
102+ \t -c, --caps greet with caps
103103
104- HELP
104+ HELP
105105 end
106106end
0 commit comments