diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2013-01-25 14:43:40 +1100 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2013-01-25 14:43:40 +1100 |
commit | 65680320bee44812394041492c8492e95b1a3d78 (patch) | |
tree | 292dff9f7f11f225baba1b2f5f30f7b5a941cadc /spec/lib | |
parent | 1ed216502e3b2ef22a1765f985aebf0c5920153e (diff) |
In rails 3 sendmail is passed the destination of the email on the commandline. Also, monkeypatch not needed anymore
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/sendmail_return_path_spec.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/lib/sendmail_return_path_spec.rb b/spec/lib/sendmail_return_path_spec.rb index 137869b6e..b4bdda12c 100644 --- a/spec/lib/sendmail_return_path_spec.rb +++ b/spec/lib/sendmail_return_path_spec.rb @@ -1,5 +1,10 @@ # This is a test of the monkey patches in sendmail_return_path.rb +# In Rails 3 the monkeypatches are not needed anymore because sendmail now has the "-f" flag +# set correctly. So, strictly these tests are testing the Rails internals. So, that means we really +# should delete them. Let's do that later when things have settled down. For the time being leave +# them in + require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe "when sending email with an altered return path" do @@ -40,7 +45,7 @@ describe "when sending email with an altered return path" do it "should set the return path when sending email using sendmail" do with_stub_popen do - IO.should_receive(:popen).once.with('/usr/sbin/sendmail -i -t -f "test@localhost"', "w+") + IO.should_receive(:popen).once.with('/usr/sbin/sendmail -i -t -f "test@localhost" postmaster@localhost', "w+") with_delivery_method :sendmail do ContactMailer.deliver_to_admin_message( "Mr. Test", "test@localhost", "Test script spec/lib/sendmail_return_path_spec.rb", |