@@ -13,7 +13,6 @@ class Haml::Generators::MailerGeneratorTest < Rails::Generators::TestCase
13
13
run_generator
14
14
15
15
if ::Rails . version . to_s >= '4.2'
16
-
17
16
assert_file "app/views/layouts/mailer.text.haml" do |view |
18
17
assert_match /\= yield/ , view
19
18
end
@@ -22,25 +21,47 @@ class Haml::Generators::MailerGeneratorTest < Rails::Generators::TestCase
22
21
assert_match /\= yield/ , view
23
22
end
24
23
25
- assert_file "app/views/notifier /foo.html.haml" do |view |
26
- assert_match %r(app/views/notifier /foo\. html\. haml) , view
24
+ assert_file "app/views/notifier_mailer /foo.html.haml" do |view |
25
+ assert_match %r(app/views/notifier_mailer /foo\. html\. haml) , view
27
26
assert_match /\= @greeting/ , view
28
27
end
29
28
30
- assert_file "app/views/notifier /bar.html.haml" do |view |
31
- assert_match %r(app/views/notifier /bar\. html\. haml) , view
29
+ assert_file "app/views/notifier_mailer /bar.html.haml" do |view |
30
+ assert_match %r(app/views/notifier_mailer /bar\. html\. haml) , view
32
31
assert_match /\= @greeting/ , view
33
32
end
34
- end
35
33
36
- assert_file "app/views/notifier/foo.text.haml" do |view |
37
- assert_match %r(app/views/notifier/foo\. text\. haml) , view
38
- assert_match /\= @greeting/ , view
39
- end
34
+ assert_file "app/views/notifier_mailer/foo.text.haml" do |view |
35
+ assert_match %r(app/views/notifier_mailer/foo\. text\. haml) , view
36
+ assert_match /\= @greeting/ , view
37
+ end
38
+
39
+ assert_file "app/views/notifier_mailer/bar.text.haml" do |view |
40
+ assert_match %r(app/views/notifier_mailer/bar\. text\. haml) , view
41
+ assert_match /\= @greeting/ , view
42
+ end
43
+ else
44
+ if ::Rails . version . to_s >= '4.1'
45
+ assert_file "app/views/notifier/foo.html.haml" do |view |
46
+ assert_match %r(app/views/notifier/foo\. html\. haml) , view
47
+ assert_match /\= @greeting/ , view
48
+ end
40
49
41
- assert_file "app/views/notifier/bar.text.haml" do |view |
42
- assert_match %r(app/views/notifier/bar\. text\. haml) , view
43
- assert_match /\= @greeting/ , view
50
+ assert_file "app/views/notifier/bar.html.haml" do |view |
51
+ assert_match %r(app/views/notifier/bar\. html\. haml) , view
52
+ assert_match /\= @greeting/ , view
53
+ end
54
+ end
55
+
56
+ assert_file "app/views/notifier/foo.text.haml" do |view |
57
+ assert_match %r(app/views/notifier/foo\. text\. haml) , view
58
+ assert_match /\= @greeting/ , view
59
+ end
60
+
61
+ assert_file "app/views/notifier/bar.text.haml" do |view |
62
+ assert_match %r(app/views/notifier/bar\. text\. haml) , view
63
+ assert_match /\= @greeting/ , view
64
+ end
44
65
end
45
66
end
46
67
end
0 commit comments