From 2fa740f048b27dc7c78b426e8f9d938405cdff6f Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Sat, 16 Feb 2013 18:39:04 +0000 Subject: Direct the incoming mail to a fixture info_request so that it doesn't affect the holding pen if run before other tests that count holding pen entries. --- spec/script/mailin_spec.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'spec/script/mailin_spec.rb') diff --git a/spec/script/mailin_spec.rb b/spec/script/mailin_spec.rb index d80789635..53f4ae125 100644 --- a/spec/script/mailin_spec.rb +++ b/spec/script/mailin_spec.rb @@ -4,7 +4,11 @@ require "external_command" def mailin_test(email_filename) Dir.chdir Rails.root do xc = ExternalCommand.new("script/mailin") - xc.run(load_file_fixture(email_filename)) + mail = load_file_fixture(email_filename) + ir = info_requests(:boring_request) + mail.gsub!('EMAIL_TO', ir.incoming_email) + mail.gsub!('EMAIL_FROM', 'geraldinequango@localhost') + xc.run(mail) xc.err.should == "" return xc end @@ -18,4 +22,4 @@ describe "When importing mail into the application" do r.out.should == "" end -end \ No newline at end of file +end -- cgit v1.2.3