Changeset 1288

Show
Ignore:
Timestamp:
01/12/08 06:23:10 (9 months ago)
Author:
has.s..@gmail.com
Message:

Make exception controllers available to the specs by putting it in the @controller ivar

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/merb/test/helper.rb

    r1286 r1288  
    165165      end 
    166166       
    167       def dispatch_fake_request(request, response, &block) 
     167      def dispatch_fake_request(request, response, status = 200, &block) 
    168168        klass = request.controller_class 
    169         @controller = klass.build(request, response, 200
     169        @controller = klass.build(request, response, status
    170170         
    171171        @controller.send(:setup_session) 
     
    179179        rescue => exception 
    180180          exception = Dispatcher.send(:controller_exception, exception) 
    181           Dispatcher.send(:dispatch_exception, request, response, exception) 
     181          @controller, @action = Dispatcher.send(:dispatch_exception, request, response, exception) 
    182182      end 
    183183