From: Tomas Doran Date: Mon, 12 Nov 2012 17:33:05 +0000 (+0000) Subject: Make a load of the tests fail more obviously X-Git-Tag: 5.90019~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=1e3b6963a326204a5a58052e9a14a5770382ae5e Make a load of the tests fail more obviously --- diff --git a/t/aggregate/live_component_controller_action_default.t b/t/aggregate/live_component_controller_action_default.t index 51940d4..4222b8c 100644 --- a/t/aggregate/live_component_controller_action_default.t +++ b/t/aggregate/live_component_controller_action_default.t @@ -66,7 +66,7 @@ sub run_tests { ok( eval '$creq = ' . $response->content, 'Unserialize Catalyst::Request' - ); + ) or fail("EXCEPTION $@ DESERIALIZING " . $response->content); is_deeply( $creq->{arguments}, $expected, 'Arguments ok' ); } diff --git a/t/aggregate/live_engine_request_headers.t b/t/aggregate/live_engine_request_headers.t index 4e4ab74..b93c1c9 100644 --- a/t/aggregate/live_engine_request_headers.t +++ b/t/aggregate/live_engine_request_headers.t @@ -29,7 +29,7 @@ use HTTP::Request::Common; ok( $response->is_success, 'Response Successful 2xx' ); is( $response->content_type, 'text/plain', 'Response Content-Type' ); like( $response->content, qr/^bless\( .* 'Catalyst::Request' \)$/s, 'Content is a serialized Catalyst::Request' ); - ok( eval '$creq = ' . $response->content, 'Unserialize Catalyst::Request' ); + ok( eval '$creq = ' . $response->content, 'Unserialize Catalyst::Request' ) or fail("Exception deseializing $@ from content " . $response->content); isa_ok( $creq, 'Catalyst::Request' ); ok( $creq->secure, 'Forwarded port sets secure' ); isa_ok( $creq->headers, 'HTTP::Headers', 'Catalyst::Request->headers' ); diff --git a/t/aggregate/live_engine_request_parameters.t b/t/aggregate/live_engine_request_parameters.t index e97ba81..d68ed0a 100644 --- a/t/aggregate/live_engine_request_parameters.t +++ b/t/aggregate/live_engine_request_parameters.t @@ -30,12 +30,12 @@ use HTTP::Request::Common; 'Content is a serialized Catalyst::Request' ); ok( eval '$creq = ' . $response->content, 'Unserialize Catalyst::Request' ); - isa_ok( $creq, 'Catalyst::Request' ); + isa_ok( $creq, 'Catalyst::Request' ) + or fail("EXCEPTION: $@"); is( $creq->method, 'GET', 'Catalyst::Request method' ); is_deeply( $creq->parameters, $parameters, 'Catalyst::Request parameters' ); } - { my $creq; ok( my $response = request("http://localhost/dump/request?q=foo%2bbar"), diff --git a/t/aggregate/live_engine_request_remote_user.t b/t/aggregate/live_engine_request_remote_user.t index c62f607..1a6c0d8 100644 --- a/t/aggregate/live_engine_request_remote_user.t +++ b/t/aggregate/live_engine_request_remote_user.t @@ -32,7 +32,8 @@ use HTTP::Request::Common; ok( eval '$creq = ' . $response->content, 'Unserialize Catalyst::Request' - ); + ) + or fail("Failed to deserialize $@ from " . $response->content); } isa_ok( $creq, 'Catalyst::Request' );