features/todo.feature in gli-2.0.0.rc5 vs features/todo.feature in gli-2.0.0.rc6
- old
+ new
@@ -6,12 +6,12 @@
Given I have GLI installed
And GLI's libs are in my path
And my terminal size is "80x24"
And todo's bin directory is in my path
- Scenario: Getting Help for todo in general
- When I successfully run `todo help`
+ Scenario Outline: Getting Help for todo in general
+ When I successfully run `todo <help>`
Then the output should contain:
"""
NAME
todo - Manages tasks
@@ -24,10 +24,11 @@
GLOBAL OPTIONS
--flag=arg - (default: none)
--help - Show this message
--[no-]otherswitch -
--[no-]switch -
+ --version -
COMMANDS
chained -
chained2, ch2 -
create, new - Create a new task or context
@@ -36,10 +37,14 @@
initconfig - Initialize the config file using current global options
list - List things, such as tasks or contexts
ls - LS things, such as tasks or contexts
second -
"""
+ Examples:
+ | help |
+ | help |
+ | --version |
Scenario: Getting Help for a top level command of todo
When I successfully run `todo help list`
Then the output should contain:
"""
@@ -166,9 +171,17 @@
Scenario: Init Config makes a reasonable config file
Given a clean home directory
When I successfully run `todo --flag foo --switch --no-otherswitch initconfig`
Then the config file should contain a section for each command and subcommand
+
+ Scenario: Init Config makes a reasonable config file if one is there and we force it
+ Given a clean home directory
+ And I successfully run `todo --flag foo --switch --no-otherswitch initconfig`
+ When I run `todo --flag foo --switch --no-otherswitch initconfig`
+ Then the exit status should not be 0
+ When I run `todo --flag foo --switch --no-otherswitch initconfig --force`
+ Then the exit status should be 0
Scenario: Configuration percolates to the app
Given a clean home directory
And a config file that specifies defaults for some commands with subcommands
When I successfully run `todo help list tasks`