File tree 5 files changed +31
-1
lines changed
lib/adhearsion/generators/app
5 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 1
1
# [ develop] ( https://github.com/adhearsion/adhearsion )
2
2
* Feature: ` Call#execute_controller ` now takes a post-execution callback (proc)
3
+ * Feature: App generator now includes directory scaffolding for call controller specs and a sample ` spec_helper.rb `
3
4
* Bugfix: Calls should be hung up when router executed controllers complete, not after everything executed by ` Call#execute_controller `
4
5
* Bugfix: Deal with race conditions raising exceptions when hanging up calls after a controller executes
5
6
Original file line number Diff line number Diff line change @@ -10,14 +10,19 @@ Feature: Adhearsion App Generator
10
10
| lib |
11
11
| config |
12
12
| script |
13
+ | spec |
14
+ | spec /call_controllers |
15
+ | spec /support |
13
16
14
17
And the following files should exist:
15
18
| .gitignore |
19
+ | .rspec |
16
20
| config /adhearsion .rb |
17
21
| config /environment .rb |
18
22
| Gemfile |
19
23
| lib /simon_game .rb |
20
24
| script /ahn |
25
+ | spec /spec_helper .rb |
21
26
| README .md |
22
27
| Rakefile |
23
28
| Procfile |
Original file line number Diff line number Diff line change @@ -4,13 +4,16 @@ module Adhearsion
4
4
module Generators
5
5
class AppGenerator < Generator
6
6
7
- BASEDIRS = %w( config lib script )
7
+ BASEDIRS = %w( config lib script spec )
8
+ EMPTYDIRS = %w( spec/call_controllers spec/support )
8
9
9
10
def setup_project
10
11
self . destination_root = @generator_name
11
12
BASEDIRS . each { |dir | directory dir }
13
+ EMPTYDIRS . each { |dir | empty_directory dir }
12
14
template "Gemfile.erb" , "Gemfile"
13
15
copy_file "gitignore" , ".gitignore"
16
+ copy_file "rspec" , ".rspec"
14
17
copy_file "Procfile"
15
18
copy_file "Rakefile"
16
19
copy_file "README.md"
Original file line number Diff line number Diff line change
1
+ --colour
Original file line number Diff line number Diff line change
1
+ ENV [ "AHN_ENV" ] ||= 'test'
2
+ require File . expand_path ( "../../config/environment" , __FILE__ )
3
+ require 'rspec/autorun'
4
+
5
+ # Requires supporting ruby files with custom matchers and macros, etc,
6
+ # in spec/support/ and its subdirectories.
7
+ Dir [ File . dirname ( __FILE__ ) + "/support/**/*.rb" ] . each { |f | require f }
8
+
9
+ RSpec . configure do |config |
10
+ # ## Mock Framework
11
+ #
12
+ # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
13
+ #
14
+ # config.mock_with :mocha
15
+ # config.mock_with :flexmock
16
+ # config.mock_with :rr
17
+
18
+ config . filter_run :focus => true
19
+ config . run_all_when_everything_filtered = true
20
+ end
You can’t perform that action at this time.
0 commit comments