File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ Feature : Controller generator spec
2
+
3
+ Scenario : Controller generator
4
+ When I run `bundle exec rails generate controller posts`
5
+ Then the features should pass
6
+ Then the output should contain:
7
+ """
8
+ create app/controllers/posts_controller.rb
9
+ invoke erb
10
+ create app/views/posts
11
+ invoke rspec
12
+ create spec/requests/posts_spec.rb
13
+ invoke helper
14
+ create app/helpers/posts_helper.rb
15
+ invoke rspec
16
+ create spec/helpers/posts_helper_spec.rb
17
+ invoke assets
18
+ invoke css
19
+ create app/assets/stylesheets/posts.css
20
+ """
21
+
22
+ Scenario : Controller generator with customized `default-path`
23
+ Given a file named ".rspec" with:
24
+ """
25
+ --default-path behaviour
26
+ """
27
+ And I run `bundle exec rails generate controller posts`
28
+ Then the features should pass
29
+ Then the output should contain:
30
+ """
31
+ create app/controllers/posts_controller.rb
32
+ invoke erb
33
+ create app/views/posts
34
+ invoke rspec
35
+ create behaviour/requests/posts_spec.rb
36
+ invoke helper
37
+ create app/helpers/posts_helper.rb
38
+ invoke rspec
39
+ create behaviour/helpers/posts_helper_spec.rb
40
+ invoke assets
41
+ invoke css
42
+ create app/assets/stylesheets/posts.css
43
+ """
You can’t perform that action at this time.
0 commit comments