Hi All - I'm having trouble with an activemailer test I created. When I run the test directly with ruby, the test passes. When I run all the unit tests they fail, because the way the message is encoded changed.
Running the test from rake test:units breaks the email into multiple mimeparts, that do not exist when running ruby unit/mailer_test.rb.
Does anyone know why running rails tests one way would cause the message to be encoded differently from another way? The code for my test looks like this:
@expected.from = '[email protected]'
@expected.to = '[email protected]'
@expected.subject = "Regarding your inquiry"
@expected.body = read_fixture('response_email')
@expected.date = Time.now
assert_equal @expected.encoded.strip, Mailer.create_response_email("[email protected]").encoded.strip
Thanks!
-Ken