diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-02-19 09:56:17 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-02-19 09:56:17 +0000 |
commit | e7067b87777b5f2dd301a852ca6f8f5af1f135b4 (patch) | |
tree | f49178156b85a8c124d6638df086c0e3c86b2276 /app | |
parent | 870d948c27607634e94eaca467cefa0e66ac0eb1 (diff) |
Move test runner disabling to request mailer in order to have access to rails environment and make hack specific to ruby 1.9.
Diffstat (limited to 'app')
-rw-r--r-- | app/models/request_mailer.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/request_mailer.rb b/app/models/request_mailer.rb index 493d6961c..dc2c5fe21 100644 --- a/app/models/request_mailer.rb +++ b/app/models/request_mailer.rb @@ -5,7 +5,11 @@ # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ require 'alaveteli_file_types' - +if Rails.env == 'test' && RUBY_VERSION.to_f >= 1.9 + # Avoid spec/script/mailin_spec.rb running script/runner as a test suite + # http://stackoverflow.com/questions/1899009/why-are-tests-running-in-production-mode-and-causing-my-script-runners-to-fail + Test::Unit.run = true +end class RequestMailer < ApplicationMailer |