/
cli_stop.feature
38 lines (35 loc) · 1.25 KB
/
cli_stop.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
Feature: Adhearsion Ahn CLI (stop)
As an Adhearsion user
I want the ahn command to provide a 'stop' command
So that I can stop a running Adhearsion daemon
Scenario: Command stop with valid path and pid option
Given JRuby skip test
Given that I create a valid app under "path/somewhere"
When I run `ahn daemon path/somewhere --pid-file=ahn.pid`
And I run `ahn stop path/somewhere --pid-file=ahn.pid`
Then the output should contain:
"""
Stopping Adhearsion
"""
And the file "ahn.pid" should not exist
Scenario: Command stop with valid path and no pid option
Given JRuby skip test
Given that I create a valid app under "path/somewhere"
When I run `ahn daemon path/somewhere`
And I run `ahn stop path/somewhere`
Then the output should contain:
"""
Stopping Adhearsion
"""
And the file "path/somewhere/adhearsion.pid" should not exist
Scenario: Command stop with no options inside the app directory
Given JRuby skip test
Given that I create a valid app under "path/somewhere"
And I cd to "path/somewhere"
When I run `ahn daemon`
And I run `ahn stop`
Then the output should contain:
"""
Stopping Adhearsion
"""
And the file "adhearsion.pid" should not exist