bmabey/email-spec — Issue #87: email_sec, delayed_job, and missing haml
Author: thimmaiah
Created: 2011-12-28 05:14:18+00:00
State: open

My testing env uses spork & cucumber - Im able to run my tests fine and decided to include email_spec. However the email tests are failing

1. My emails are sent out using delayed_job
2. email_spec is running the delayed job before checking the emails
3. However the emails (which use haml) are not getting sent out because the delayed_job is failing with

###### Error Msg #######
Missing template user_response_mailer/send_contact_info with {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml], :formats=>[:html], :locale=>[:en]

4. Note that the handlers in the error don't show :haml in its list of handler. Ive got the haml and haml-rails gem in my gemfile and my app send out mail properly in non-test env (no such errors as above in dev/prod)

The main question is

Why is haml not getting loaded automatically when my email templates are being rendered via delayed_job running under spork ?