- Edit: followup to delayed_job job logging failures
Switching to resque might help, but not without first rewriting the jobs.
More research yielded the fact that delayed_job reopens all files (including the log files) when it spins up. Under Ruby 1.8, File#reopen defaults file mode to last set, while 1.9 defaults to read only. This could easily cause logging failures. (with a nod to Davis W. Frank for the followup info)
Calling .destroy on a has_one relationship does not update the record association to nil, which can cause problems when the relationship is subsequently updated. It was suggested that calling .clear on the association might help work around the issue.
Rails 3 request helper methods in ActionController::TestCase::Behavior take the session and flash hashes as parameters, as opposed to setting them explicitly before making a normal get request. Compare http://api.rubyonrails.org/classes/ActionController/TestCase/Behavior.html#method-i-get with http://api.rubyonrails.org/classes/ActionDispatch/Integration/RequestHelpers.html#method-i-get for more detail