diff --git a/app/mailers/mailer.rb b/app/mailers/mailer.rb index 06f65ee..1cf92df 100644 --- a/app/mailers/mailer.rb +++ b/app/mailers/mailer.rb @@ -7,7 +7,7 @@ class Mailer < ActionMailer::Base mail({ :to => @app.watchers.map(&:address), - :subject => "[#{@app.name}] #{@notice.err.message}" + :subject => "[#{@app.name}][#{@notice.err.environment}] #{@notice.err.message}" }) end @@ -21,4 +21,4 @@ class Mailer < ActionMailer::Base }) end -end \ No newline at end of file +end diff --git a/spec/controllers/notices_controller_spec.rb b/spec/controllers/notices_controller_spec.rb index 8e632dc..1b9980e 100644 --- a/spec/controllers/notices_controller_spec.rb +++ b/spec/controllers/notices_controller_spec.rb @@ -24,6 +24,8 @@ describe NoticesController do email = ActionMailer::Base.deliveries.last email.to.should include(@app.watchers.first.email) email.subject.should include(@notice.err.message) + email.subject.should include("[#{@app.name}]") + email.subject.should include("[#{@notice.err.environment}]") end end -- libgit2 0.21.2