From: Tomas Doran Date: Tue, 23 Oct 2012 20:08:08 +0000 (+0100) Subject: Using a regex on data::dumper output is insane. I suck X-Git-Tag: 5.90018~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=4526748a7ef8f3989684fea5f44e13b71a1913e6 Using a regex on data::dumper output is insane. I suck --- diff --git a/t/aggregate/live_component_controller_action_local.t b/t/aggregate/live_component_controller_action_local.t index 24fc2e4..184a373 100644 --- a/t/aggregate/live_component_controller_action_local.t +++ b/t/aggregate/live_component_controller_action_local.t @@ -129,11 +129,17 @@ sub run_tests { 'TestApp::Controller::Action::Local', 'Test Class' ); - like( - $response->content, - qr~arguments => \[\s*'foo/bar'\s*\]~, - "Parameters don't split on %2F" - ); + my $content = $response->content; + { + local $@; + my $request = eval $content; + if ($@) { + fail("Content cannot be unserialized: $@ $content"); + } + else { + is_deeply $request->arguments, ['foo/bar'], "Parameters don't split on %2F"; + } + } } {