Skip to content

Commit 8f831c5

Browse files
vivekmiyanipirj
authored andcommitted
Add mailer generator feature
1 parent dfe155d commit 8f831c5

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
Feature: Mailer generator spec
2+
3+
Scenario: Mailer generator
4+
When I run `bundle exec rails generate mailer posts index show`
5+
Then the features should pass
6+
Then the output should contain:
7+
"""
8+
create app/mailers/posts_mailer.rb
9+
invoke erb
10+
create app/views/posts_mailer
11+
create app/views/posts_mailer/index.text.erb
12+
create app/views/posts_mailer/index.html.erb
13+
create app/views/posts_mailer/show.text.erb
14+
create app/views/posts_mailer/show.html.erb
15+
invoke rspec
16+
create spec/mailers/posts_spec.rb
17+
create spec/fixtures/posts/index
18+
create spec/fixtures/posts/show
19+
create spec/mailers/previews/posts_preview.rb
20+
"""
21+
22+
Scenario: Mailer 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 mailer posts index show`
28+
Then the features should pass
29+
Then the output should contain:
30+
"""
31+
create app/mailers/posts_mailer.rb
32+
invoke erb
33+
create app/views/posts_mailer
34+
create app/views/posts_mailer/index.text.erb
35+
create app/views/posts_mailer/index.html.erb
36+
create app/views/posts_mailer/show.text.erb
37+
create app/views/posts_mailer/show.html.erb
38+
invoke rspec
39+
create behaviour/mailers/posts_spec.rb
40+
create behaviour/fixtures/posts/index
41+
create behaviour/fixtures/posts/show
42+
create behaviour/mailers/previews/posts_preview.rb
43+
"""

0 commit comments

Comments
 (0)