/
cli_create.feature
119 lines (111 loc) · 4.06 KB
/
cli_create.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
Feature: Adhearsion Ahn CLI (Create)
As an Adhearsion user
I want the ahn command to allow creating an app
So that I can write an Adhearsion app
Scenario: Generate application with valid layout
When I run `ahn create path/somewhere`
And I cd to "path/somewhere"
Then the following directories should exist:
| app/assets/audio |
| app/assets/audio/en |
| app/call_controllers |
| lib |
| config |
| config/locales |
| script |
| spec |
| spec/call_controllers |
| spec/support |
And the following files should exist:
| .gitignore |
| .rspec |
| app/assets/audio/en/hello_world.wav |
| app/call_controllers/simon_game.rb |
| config/adhearsion.rb |
| config/environment.rb |
| config/events.rb |
| config/routes.rb |
| config/locales/en.yml |
| config.ru |
| Gemfile |
| script/ahn |
| spec/spec_helper.rb |
| spec/call_controllers/simon_game_spec.rb |
| README.md |
| Rakefile |
| Procfile |
And the file "config/adhearsion.rb" should contain each of these content parts:
"""
Adhearsion.config
logging.level
config.platform.username
"""
And the file "config/events.rb" should contain each of these content parts:
"""
Adhearsion::Events.draw do
"""
And the file "config/routes.rb" should contain each of these content parts:
"""
Adhearsion.router
"""
And the file "config.ru" should contain each of these content parts:
"""
run Sinatra::Application
"""
And the file "README.md" should contain each of these content parts:
"""
Start your new app with
AGI(agi
"""
And the file "Rakefile" should contain "adhearsion/tasks"
And the file "Gemfile" should contain each of these content parts:
"""
source 'https://rubygems.org'
gem 'adhearsion'
"""
And the file "app/call_controllers/simon_game.rb" should contain "class SimonGame"
And the file "script/ahn" should contain "require 'adhearsion'"
And the file "config/locales/en.yml" should contain "en:"
Scenario: Generate application --empty
When I run `ahn create path/somewhere --empty`
And I cd to "path/somewhere"
Then the following directories should exist:
| app/assets/audio |
| app/call_controllers |
| lib |
| config |
| config/locales |
| script |
| spec |
| spec/call_controllers |
| spec/support |
And the following files should exist:
| .gitignore |
| .rspec |
| config/adhearsion.rb |
| config/environment.rb |
| config/events.rb |
| config/routes.rb |
| config.ru |
| Gemfile |
| script/ahn |
| spec/spec_helper.rb |
| README.md |
| Rakefile |
| Procfile |
And the following files should not exist:
| app/assets/audio/en/hello_world.wav |
| app/call_controllers/simon_game.rb |
| config/locales/en.yml |
| spec/call_controllers/simon_game_spec.rb |
And the file "config/events.rb" should not contain each of these content parts:
"""
# Register global handlers for events
"""
Scenario: Running create with no arguments
When I run `ahn create`
Then the output should contain:
"""
no arguments
"""
And the exit status should be 1