Commit | Line | Data |
b68b4c7c |
1 | use strict; |
2 | use warnings; |
e16a6c4e |
3 | use Test::More; |
4 | |
5 | BEGIN { |
6 | if (eval 'require Moose; 1') { |
7 | plan tests => 2; |
8 | } |
9 | else { |
10 | plan skip_all => 'Moose is required for this test'; |
11 | } |
12 | } |
b68b4c7c |
13 | |
14 | use FindBin; |
15 | use lib "$FindBin::Bin/lib"; |
16 | |
b68b4c7c |
17 | use Catalyst::Test 'TestApp'; |
18 | |
19 | { |
f04fdeda |
20 | my $response = request('http://localhost/moose/the_answer'); |
b68b4c7c |
21 | ok($response->is_success); |
f04fdeda |
22 | is($response->content, 'the meaning of life: 42', 'attr defaults + BUILD works correctly'); |
b68b4c7c |
23 | } |