|
26 | 26 |
|
27 | 27 | subject 'invalid RFC2822'
|
28 | 28 | end
|
29 |
| - |
30 |
| - Mail::Exim.should_receive(:call).with('/usr/sbin/exim', |
31 |
| - '-i -t -f "[email protected]" --', |
32 |
| - |
33 |
| - mail.encoded) |
| 29 | + |
| 30 | + Mail:: Sendmail.should_receive(:call).with('/usr/sbin/exim', '-i -t -f "[email protected]" --', nil, mail.encoded) |
| 31 | + |
34 | 32 | mail.deliver!
|
35 | 33 | end
|
36 | 34 |
|
|
50 | 48 |
|
51 | 49 | body "body"
|
52 | 50 | end
|
53 |
| - |
54 |
| - Mail::Exim.should_receive(:call).with('/usr/sbin/exim', |
55 |
| - '-i -t -f "[email protected]" --', |
56 |
| - |
57 |
| - mail.encoded) |
58 |
| - |
59 |
| - mail.deliver |
60 | 51 |
|
| 52 | + Mail:: Sendmail.should_receive(:call).with('/usr/sbin/exim', '-i -t -f "[email protected]" --', nil, mail.encoded) |
| 53 | + |
| 54 | + mail.deliver |
61 | 55 | end
|
62 | 56 |
|
63 | 57 | it "should use the sender address is no return path is specified" do
|
|
74 | 68 | body "body"
|
75 | 69 | end
|
76 | 70 |
|
77 |
| - Mail::Exim.should_receive(:call).with('/usr/sbin/exim', |
78 |
| - '-i -t -f "[email protected]" --', |
79 |
| - |
80 |
| - mail.encoded) |
81 |
| - |
82 | 71 | mail.deliver
|
83 | 72 | end
|
84 |
| - |
| 73 | + |
85 | 74 | it "should use the from address is no return path or sender are specified" do
|
86 | 75 | Mail.defaults do
|
87 | 76 | delivery_method :exim
|
|
95 | 84 | body "body"
|
96 | 85 | end
|
97 | 86 |
|
98 |
| - Mail::Exim.should_receive(:call).with('/usr/sbin/exim', |
99 |
| - '-i -t -f "[email protected]" --', |
100 |
| - |
101 |
| - mail.encoded) |
| 87 | + Mail:: Sendmail.should_receive(:call).with('/usr/sbin/exim', '-i -t -f "[email protected]" --', nil, mail.encoded) |
| 88 | + |
102 | 89 | mail.deliver
|
103 | 90 | end
|
104 | 91 |
|
|
115 | 102 | body 'body'
|
116 | 103 | end
|
117 | 104 |
|
118 |
| - Mail::Exim.should_receive(:call).with('/usr/sbin/exim', |
119 |
| - '-i -t -f "\"from+suffix test\"@test.lindsaar.net" --', |
120 |
| - |
121 |
| - mail.encoded) |
| 105 | + Mail::Sendmail.should_receive(:call).with('/usr/sbin/exim', '-i -t -f "\"from+suffix test\"@test.lindsaar.net" --', nil, mail.encoded) |
| 106 | + |
122 | 107 | mail.deliver
|
123 | 108 | end
|
124 | 109 |
|
|
132 | 117 |
|
133 | 118 | end
|
134 | 119 |
|
135 |
| - Mail::Exim.should_receive(:call).with('/usr/sbin/exim', |
136 |
| - '-i -t -f "[email protected]" --', |
137 |
| - |
138 |
| - mail.encoded) |
| 120 | + Mail:: Sendmail.should_receive(:call).with('/usr/sbin/exim', '-i -t -f "[email protected]" --', nil, mail.encoded) |
| 121 | + |
139 | 122 | mail.deliver
|
140 | 123 | end
|
141 | 124 | end
|
|
151 | 134 | subject 'invalid RFC2822'
|
152 | 135 | end
|
153 | 136 |
|
154 |
| - Mail::Exim.should_receive(:call).with('/usr/sbin/exim', |
155 |
| - |
156 |
| - |
157 |
| - mail.encoded) |
| 137 | + Mail:: Sendmail.should_receive(:call).with('/usr/sbin/exim', ' -f "[email protected]" --', nil, mail.encoded) |
| 138 | + |
158 | 139 | mail.deliver!
|
159 | 140 | end
|
160 | 141 |
|
|
168 | 149 |
|
169 | 150 | subject 'invalid RFC2822'
|
170 | 151 | end
|
171 |
| - |
172 |
| - Mail::Exim.should_receive(:call).with('/usr/sbin/exim', |
173 |
| - " -f \"\\\"foo\\\\\\\"\\;touch /tmp/PWNED\\;\\\\\\\"\\\"@blah.com\" --", |
174 |
| - |
175 |
| - mail.encoded) |
| 152 | + |
| 153 | + Mail::Sendmail.should_receive(:call).with( |
| 154 | + '/usr/sbin/exim', |
| 155 | + " -f \"\\\"foo\\\\\\\"\\;touch /tmp/PWNED\\;\\\\\\\"\\\"@blah.com\" --", |
| 156 | + nil, |
| 157 | + mail.encoded) |
| 158 | + |
176 | 159 | mail.deliver!
|
177 | 160 | end
|
178 | 161 |
|
|
0 commit comments