To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / .svn / pristine / 61 / 61a91d37bba4f376ceeb50ad99e25e5c58c85000.svn-base @ 1297:0a574315af3e

History | View | Annotate | Download (740 Bytes)

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