diff options
| author | Louise Crow <louise.crow@gmail.com> | 2013-02-16 18:39:04 +0000 | 
|---|---|---|
| committer | Louise Crow <louise.crow@gmail.com> | 2013-02-16 18:39:04 +0000 | 
| commit | 2fa740f048b27dc7c78b426e8f9d938405cdff6f (patch) | |
| tree | b2c5d79624bad96f8cc584440b1a11e12e670c8b | |
| parent | ffe7c9a0129e3c5241178ac289be74ed8b999573 (diff) | |
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.
| -rw-r--r-- | spec/script/mailin_spec.rb | 8 | 
1 files changed, 6 insertions, 2 deletions
| 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 | 
