/[Frey]/trunk/t/01-frey-config.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/t/01-frey-config.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 219 - (show annotations)
Fri Oct 31 22:55:08 2008 UTC (14 years, 1 month ago) by dpavlin
File MIME type: application/x-troff
File size: 594 byte(s)
Frey::Config for default values to objects
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4
5 use Test::More tests => 8;
6 use lib 'lib';
7
8 use Data::Dump qw/dump/;
9
10 my $debug = 1 if @ARGV;
11
12 BEGIN {
13 use_ok('Frey::Config');
14 use_ok('Frey');
15 }
16
17 {
18 package Test::Mock;
19 use Moose;
20 extends 'Frey';
21 with 'Frey::Config';
22 }
23
24 isa_ok( Frey::Config->meta, 'Moose::Meta::Role' );
25
26 ok( my $o = Test::Mock->new( debug => $debug ), 'new' );
27 diag $o->dump(2) if $debug;
28
29 ok( my $config = $o->config, 'config' );
30
31 diag dump($config) if $debug;
32
33 ok( $o->config->{test}, 'test' );
34 ok( $o->config->{config}, 'config' );
35 is( $o->config->{numeric}, 42, 'numeric' );

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26