From 7adfd53f17f66ffe93763e944ed1d3fc52a369dc Mon Sep 17 00:00:00 2001 From: matthewt Date: Wed, 12 Sep 2007 18:11:34 +0000 Subject: moved shit to trunk --- t/05reflect_attr_from.t | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 t/05reflect_attr_from.t (limited to 't/05reflect_attr_from.t') diff --git a/t/05reflect_attr_from.t b/t/05reflect_attr_from.t new file mode 100644 index 0000000..67974ba --- /dev/null +++ b/t/05reflect_attr_from.t @@ -0,0 +1,34 @@ +package TestMe2; +use strict; +use warnings; +use Reaction::Class; +use Reaction::Types::DateTime; + +has id => (is => 'ro', required => 1, isa => 'Int'); +has username => (is => 'rw', required => 1, isa => 'NonEmptySimpleStr'); +has created_d => (is => 'rw', required => 1, isa => 'DateTime'); + +1; + +package TestMe; +use strict; +use warnings; +use Reaction::Class; + +reflect_attributes_from('TestMe2' => qw(id username created_d)); + +1; + +package main; +use strict; +use warnings; +use Data::Dumper; +use Test::More; + +plan tests => 1; + +my @test_list = TestMe->meta->get_attribute_list; +my @test2_list = TestMe2->meta->get_attribute_list; +is_deeply(\@test_list, \@test2_list, "Attribute lists match"); + +1; -- cgit v1.2.3-54-g00ecf