Separate user and issue observation from mail observer
Created by: robbkidd
Submitted for review, do not merge without discussion!
It seems like I made a lot of changes in this. I only split out two of the four classes MailerObserver observes: User and Issue. If you like what is here, I can do the other two.
All observers are turned off by default when running specs. Observers are turned back on when their actual behavior is being tested.
Because we moved to resque_mailer, I added the resque_spec gem to turn queues on and off when needed under test.
For changed issues, I split the logic of sending a reassigned email from the logic of creating a status change note.
The implementation of creating a Note that is a status change was moved to a Note.create_status_change_note method. This could be reused by a MergeRequestObserver if you like the observers in this pull request.
And there are tests in this one. It's Ruby, fellas; I'm back on firmer ground.