Skip to content

Commit c25a02a

Browse files
vivekmiyanipirj
authored andcommitted
Add channel generator feature
1 parent 213d19f commit c25a02a

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Feature: Channel generator spec
2+
3+
Scenario: Channel generator
4+
When I run `bundle exec rails generate channel group`
5+
Then the features should pass
6+
Then the output should contain:
7+
"""
8+
invoke rspec
9+
create spec/channels/group_channel_spec.rb
10+
create app/channels/group_channel.rb
11+
identical app/javascript/channels/index.js
12+
identical app/javascript/channels/consumer.js
13+
create app/javascript/channels/group_channel.js
14+
"""
15+
16+
Scenario: Channel generator with customized `default-path`
17+
Given a file named ".rspec" with:
18+
"""
19+
--default-path behaviour
20+
"""
21+
And I run `bundle exec rails generate channel group`
22+
Then the features should pass
23+
Then the output should contain:
24+
"""
25+
invoke rspec
26+
create behaviour/channels/group_channel_spec.rb
27+
create app/channels/group_channel.rb
28+
identical app/javascript/channels/index.js
29+
identical app/javascript/channels/consumer.js
30+
create app/javascript/channels/group_channel.js
31+
"""

0 commit comments

Comments
 (0)