Changeset 17372 for lang

Show
Ignore:
Timestamp:
08/11/08 13:17:29 (5 years ago)
Author:
yappo
Message:

add make_context exception test

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/HTTP-Engine/trunk/t/010_core/request_processor-make_context.t

    r17368 r17372  
    1212use strict; 
    1313use warnings; 
    14 use Test::More tests => 4; 
     14use Test::More tests => 5; 
    1515 
    1616use HTTP::Engine::Context; 
     
    3535}; 
    3636 
    37  
    3837do { 
    3938   my $c = $rp->make_context( 
     
    4544}; 
    4645 
    47  
     46do { 
     47   no strict 'refs'; 
     48   no warnings 'redefine'; 
     49   local *HTTP::Engine::Request::new = sub {}; 
     50   local *HTTP::Engine::Response::new = sub {}; 
     51   local $@; 
     52   eval { $rp->make_context }; 
     53   like $@, qr/Validation failed/; 
     54};