X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flive_component_controller_moose.t;h=98912ba667e5f39f60ced9fd335e886b2956d95a;hb=26dd6d9f6575fe782e78d6845fff3447e5ba5744;hp=e0b6f5d1340b77e8708448955caf1127ea933845;hpb=b68b4c7c977622dd5b8770bcaae617f6e80d29e6;p=catagits%2FCatalyst-Runtime.git diff --git a/t/live_component_controller_moose.t b/t/live_component_controller_moose.t index e0b6f5d..98912ba 100644 --- a/t/live_component_controller_moose.t +++ b/t/live_component_controller_moose.t @@ -1,18 +1,23 @@ -#!perl - use strict; use warnings; +use Test::More; + +BEGIN { + if (eval 'require Moose; 1') { + plan tests => 2; + } + else { + plan skip_all => 'Moose is required for this test'; + } +} use FindBin; use lib "$FindBin::Bin/lib"; -our $iters; - -use Test::More tests => 2; use Catalyst::Test 'TestApp'; { - my $response = request('http://localhost/moose/get_attribute'); + my $response = request('http://localhost/moose/the_answer'); ok($response->is_success); - is($response->content, '42', 'attribute default values get set correctly'); + is($response->content, 'the meaning of life: 42', 'attr defaults + BUILD works correctly'); }