Mercurial > hg > soundsoftware-site
comparison vendor/plugins/engines/test/functional/exception_notification_compatibility_test.rb @ 0:513646585e45
* Import Redmine trunk SVN rev 3859
author | Chris Cannam |
---|---|
date | Fri, 23 Jul 2010 15:52:44 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:513646585e45 |
---|---|
1 require File.dirname(__FILE__) + '/../test_helper' | |
2 | |
3 class ExceptionNotificationCompatibilityTest < ActionController::TestCase | |
4 ExceptionNotifier.exception_recipients = %w(joe@schmoe.com bill@schmoe.com) | |
5 class SimpleController < ApplicationController | |
6 include ExceptionNotifiable | |
7 local_addresses.clear | |
8 consider_all_requests_local = false | |
9 def index | |
10 begin | |
11 raise "Fail!" | |
12 rescue Exception => e | |
13 rescue_action_in_public(e) | |
14 end | |
15 end | |
16 end | |
17 | |
18 def setup | |
19 @controller = SimpleController.new | |
20 @request = ActionController::TestRequest.new | |
21 @response = ActionController::TestResponse.new | |
22 end | |
23 | |
24 def test_should_work | |
25 assert_nothing_raised do | |
26 get :index | |
27 end | |
28 end | |
29 end |