features/2.initialization.feature in pinpress-1.2.2 vs features/2.initialization.feature in pinpress-1.2.3
- old
+ new
@@ -8,62 +8,38 @@
Given no file located at "/tmp/pp/.pinpress"
When I run `pinpress init` interactively
And I type ""
And I type "bachya:12345"
Then the exit status should be 0
- And the following files should exist:
- | /tmp/pp/.pinpress |
+ And a valid configuration file should exist at "/tmp/pp/.pinpress"
Scenario: Reinitialization (refuse)
- Given a file located at "/tmp/pp/.pinpress" with the contents:
- """
- ---
- pinpress:
- config_location: "/tmp/pp/.pinpress"
- default_pin_template: pinpress_default
- default_tag_template: pinpress_default
- log_level: WARN
- version: 1.1.1
- api_token: bachya:12345
- """
- When I run `pinpress init` interactively
- And I type ""
- Then the exit status should be 0
+ Given an existing current configuration file located at "/tmp/pp/.pinpress"
+ When I run `pinpress init` interactively
+ And I type ""
+ Then the exit status should be 0
Scenario: Reinitialization (accept)
- Given a file located at "/tmp/pp/.pinpress" with the contents:
- """
- ---
- pinpress:
- config_location: "/tmp/pp/.pinpress"
- default_pin_template: pinpress_default
- default_tag_template: pinpress_default
- log_level: WARN
- version: 1.1.1
- api_token: bachya:12345
- """
+ Given an existing current configuration file located at "/tmp/pp/.pinpress"
When I run `pinpress init` interactively
And I type "y"
And I type ""
And I type "bachya:12345"
Then the exit status should be 0
- And the following files should exist:
- | /tmp/pp/.pinpress |
+ And a valid configuration file should exist at "/tmp/pp/.pinpress"
- Scenario: Reinitialization (from scratch)
- Given a file located at "/tmp/pp/.pinpress" with the contents:
- """
- ---
- pinpress:
- config_location: "/tmp/pp/.pinpress"
- default_pin_template: pinpress_default
- default_tag_template: pinpress_default
- log_level: WARN
- version: 1.1.1
- api_token: bachya:12345
- """
+ Scenario: Reinitialization (accept)
+ Given an existing current configuration file located at "/tmp/pp/.pinpress"
When I run `pinpress init -s` interactively
And I type ""
And I type "bachya:12345"
Then the exit status should be 0
- And the following files should exist:
- | /tmp/pp/.pinpress |
+ And a valid configuration file should exist at "/tmp/pp/.pinpress"
+
+ Scenario: Update out-of-date configuration file
+ Given an existing old configuration file located at "/tmp/pp/.pinpress"
+ When I run `pinpress init` interactively
+ And I type ""
+ And I type ""
+ And I type "bachya:12345"
+ Then the exit status should be 0
+ And a valid configuration file should exist at "/tmp/pp/.pinpress"