-
Notifications
You must be signed in to change notification settings - Fork 4
/
config.feature
70 lines (63 loc) · 1.93 KB
/
config.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Feature: Configure ADR cli
Background:
Given a new working directory
Scenario: List config settings
When I run "pyadr config --list"
Then it should pass with
"""
records-dir = docs/adr
"""
Scenario: Get config setting value
When I run "pyadr config records-dir"
Then it should pass with
"""
records-dir = docs/adr
"""
Scenario: Read config file
Given a file named ".adr" with
"""
[adr]
records-dir = another_dir
"""
When I run "pyadr config records-dir"
Then it should pass with
"""
records-dir = another_dir
"""
Scenario: Write to config file when setting config setting
Given the file named ".adr" does not exist
When I run "pyadr config records-dir another_dir"
Then it should pass
And a file named ".adr" should exist
And the file ".adr" should contain
"""
[adr]
records-dir = another_dir
"""
Scenario: Set config setting: ADR directory
When I run "pyadr config records-dir another_dir"
Then it should pass with
"""
Configured 'records-dir' to 'another_dir'
"""
And a file named ".adr" should exist
And the file ".adr" should contain
"""
[adr]
records-dir = another_dir
"""
Scenario: Unset config settings
Given a file named ".adr" with
"""
[adr]
records-dir = another_dir
"""
When I run "pyadr config records-dir --unset"
Then it should pass with
"""
Config setting 'records-dir' unset.
"""
And the file ".adr" should not contain
"""
records-dir = another_dir
"""