aboutsummaryrefslogtreecommitdiffstats
path: root/railties/doc
diff options
context:
space:
mode:
authorathonlab <akshay.surve@gmail.com>2008-10-11 23:43:53 +0530
committerKarel Minarik <karmi@karmi.cz>2008-10-14 10:20:12 +0200
commit46ecc7b086b1172b8e9e82b53e98b4ea4e607d29 (patch)
treefea6e4b016162a5385f892586aca67129a4cf285 /railties/doc
parent7f7083514b8df54a4887fc6259d6e3f3e6d3c0f1 (diff)
downloadrails-46ecc7b086b1172b8e9e82b53e98b4ea4e607d29.tar.gz
rails-46ecc7b086b1172b8e9e82b53e98b4ea4e607d29.tar.bz2
rails-46ecc7b086b1172b8e9e82b53e98b4ea4e607d29.zip
Removes the 'Filtering emails in development' section from testing guide.
Diffstat (limited to 'railties/doc')
-rw-r--r--railties/doc/guides/testing_rails_applications/testing_rails_applications.txt32
1 files changed, 0 insertions, 32 deletions
diff --git a/railties/doc/guides/testing_rails_applications/testing_rails_applications.txt b/railties/doc/guides/testing_rails_applications/testing_rails_applications.txt
index 11ff2e6a41..f8bfc66b79 100644
--- a/railties/doc/guides/testing_rails_applications/testing_rails_applications.txt
+++ b/railties/doc/guides/testing_rails_applications/testing_rails_applications.txt
@@ -900,38 +900,6 @@ class MyControllerTest < Test::Unit::TestCase
end
----------------------------------------------------------------
-=== Filtering emails in development ===
-
-Sometimes you want to be somewhere inbetween the `:test` and `:smtp` settings. Say you're working on your development site, and you have a few testers working with you. The site isn't in production yet, but you'd like the testers to be able to receive emails from the site, but no one else. Here's a handy way to handle that situation, add this to your 'environment.rb' or 'development.rb' file
-
-[source, ruby]
-----------------------------------------------------------------
-class ActionMailer::Base
-
- def perform_delivery_fixed_email(mail)
- destinations = mail.destinations
- if destinations.nil?
- destinations = ["mymail@me.com"]
- mail.subject = '[TEST-FAILURE]:'+mail.subject
- else
- mail.subject = '[TEST]:'+mail.subject
- end
- approved = ["testerone@me.com","testertwo@me.com"]
- destinations = destinations.collect{|x| approved.collect{|y| (x==y ? x : nil)}}.flatten.compact
- mail.to = destinations
- if destinations.size > 0
- mail.ready_to_send
- Net::SMTP.start(server_settings[:address], server_settings[:port], server_settings[:domain],
- server_settings[:user_name], server_settings[:password], server_settings[:authentication]) do |smtp|
- smtp.sendmail(mail.encoded, mail.from, destinations)
- end
- end
-
- end
-
-end
-----------------------------------------------------------------
-
== Guide TODO ==
* Describe _setup_ and _teardown_
* Examples for integration test