Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 61 lines (56 sloc) 1.779 kB
f85d294 @jferris Check for more edge cases when parsing options and display help when …
jferris authored
1 Feature: get help on using trout
2
3 Scenario Outline: Specify an unknown command
4 When I run "trout <arguments>"
5 Then the output should contain:
6 """
7 I don't know how to "<command>."
8 Run "trout help" for usage information.
9 """
10 Examples:
11 | arguments | command |
12 | swim | swim |
13 | help swim | swim |
14
15 Scenario Outline: Run an invalid command
16 When I run "<invalid command>"
17 Then the output should contain:
18 """
19 I don't understand the options you provided.
20 Run "<help command>" for usage information.
21 """
22 Examples:
23 | invalid command | help command |
24 | trout checkout | trout help checkout |
25 | trout checkout file | trout help checkout |
26 | trout checkout file url extra | trout help checkout |
27 | trout update | trout help update |
28 | trout update file extra | trout help update |
29
30 Scenario Outline: Ask for help
31 When I run "<help command>"
32 Then the output should contain:
33 """
34 trout helps you sync individual files from other git repositories.
35 """
36 And the output should contain:
37 """
38 Commands:
39 """
40 And the output should not contain:
41 """
42 I don't know how
43 """
44 Examples:
45 | help command |
46 | trout |
47 | trout help |
48 | trout -h |
49 | trout --help |
50
51 Scenario Outline: Ask for usage for a particular command
52 When I run "trout help <command>"
53 Then the output should contain:
54 """
55 Usage: trout <command> <usage>
56 """
57 Examples:
58 | command | usage |
59 | checkout | filename git_url |
60 | update | filename |
Something went wrong with that request. Please try again.