From: Yuval Kogman <nothingmuch@woobling.org> Date: Fri, 25 Sep 2009 20:09:05 +0000 (+0300) Subject: DEATH TO ALL zionist ELLIPSES X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fabandoned%2Fdeath_to_all_ellipses;p=gitmo%2FMoose.git DEATH TO ALL zionist ELLIPSES --- diff --git a/lib/Moose/Cookbook/Basics/Recipe1.pod b/lib/Moose/Cookbook/Basics/Recipe1.pod index bd1239b..8adb1cc 100644 --- a/lib/Moose/Cookbook/Basics/Recipe1.pod +++ b/lib/Moose/Cookbook/Basics/Recipe1.pod @@ -244,43 +244,43 @@ my $point = Point->new( x => 1, y => 2 ); isa_ok( $point, 'Point' ); isa_ok( $point, 'Moose::Object' ); -is( $point->x, 1, '... got the right value for x' ); -is( $point->y, 2, '... got the right value for y' ); +is( $point->x, 1, 'got the right value for x' ); +is( $point->y, 2, 'got the right value for y' ); $point->y(10); -is( $point->y, 10, '... got the right (changed) value for y' ); +is( $point->y, 10, 'got the right (changed) value for y' ); dies_ok { $point->y('Foo'); } -'... cannot assign a non-Int to y'; +'cannot assign a non-Int to y'; dies_ok { Point->new(); } -'... must provide required attributes to new'; +'must provide required attributes to new'; $point->clear(); -is( $point->x, 0, '... got the right (cleared) value for x' ); -is( $point->y, 0, '... got the right (cleared) value for y' ); +is( $point->x, 0, 'got the right (cleared) value for x' ); +is( $point->y, 0, 'got the right (cleared) value for y' ); # check the type constraints on the constructor lives_ok { Point->new( x => 0, y => 0 ); } -'... can assign a 0 to x and y'; +'can assign a 0 to x and y'; dies_ok { Point->new( x => 10, y => 'Foo' ); } -'... cannot assign a non-Int to y'; +'cannot assign a non-Int to y'; dies_ok { Point->new( x => 'Foo', y => 10 ); } -'... cannot assign a non-Int to x'; +'cannot assign a non-Int to x'; # Point3D @@ -289,35 +289,35 @@ isa_ok( $point3d, 'Point3D' ); isa_ok( $point3d, 'Point' ); isa_ok( $point3d, 'Moose::Object' ); -is( $point3d->x, 10, '... got the right value for x' ); -is( $point3d->y, 15, '... got the right value for y' ); -is( $point3d->{'z'}, 3, '... got the right value for z' ); +is( $point3d->x, 10, 'got the right value for x' ); +is( $point3d->y, 15, 'got the right value for y' ); +is( $point3d->{'z'}, 3, 'got the right value for z' ); $point3d->clear(); -is( $point3d->x, 0, '... got the right (cleared) value for x' ); -is( $point3d->y, 0, '... got the right (cleared) value for y' ); -is( $point3d->z, 0, '... got the right (cleared) value for z' ); +is( $point3d->x, 0, 'got the right (cleared) value for x' ); +is( $point3d->y, 0, 'got the right (cleared) value for y' ); +is( $point3d->z, 0, 'got the right (cleared) value for z' ); dies_ok { Point3D->new( x => 10, y => 'Foo', z => 3 ); } -'... cannot assign a non-Int to y'; +'cannot assign a non-Int to y'; dies_ok { Point3D->new( x => 'Foo', y => 10, z => 3 ); } -'... cannot assign a non-Int to x'; +'cannot assign a non-Int to x'; dies_ok { Point3D->new( x => 0, y => 10, z => 'Bar' ); } -'... cannot assign a non-Int to z'; +'cannot assign a non-Int to z'; dies_ok { Point3D->new( x => 10, y => 3 ); } -'... z is a required attribute for Point3D'; +'z is a required attribute for Point3D'; # test some class introspection @@ -328,14 +328,14 @@ can_ok( 'Point3D', 'meta' ); isa_ok( Point3D->meta, 'Moose::Meta::Class' ); isnt( Point->meta, Point3D->meta, - '... they are different metaclasses as well' ); + 'they are different metaclasses as well' ); # poke at Point is_deeply( [ Point->meta->superclasses ], ['Moose::Object'], - '... Point got the automagic base class' + 'Point got the automagic base class' ); my @Point_methods = qw(meta x y clear); @@ -344,29 +344,29 @@ my @Point_attrs = ( 'x', 'y' ); is_deeply( [ sort @Point_methods ], [ sort Point->meta->get_method_list() ], - '... we match the method list for Point' + 'we match the method list for Point' ); is_deeply( [ sort @Point_attrs ], [ sort Point->meta->get_attribute_list() ], - '... we match the attribute list for Point' + 'we match the attribute list for Point' ); foreach my $method (@Point_methods) { ok( Point->meta->has_method($method), - '... Point has the method "' . $method . '"' ); + 'Point has the method "' . $method . '"' ); } foreach my $attr_name (@Point_attrs) { ok( Point->meta->has_attribute($attr_name), - '... Point has the attribute "' . $attr_name . '"' ); + 'Point has the attribute "' . $attr_name . '"' ); my $attr = Point->meta->get_attribute($attr_name); ok( $attr->has_type_constraint, - '... Attribute ' . $attr_name . ' has a type constraint' ); + 'Attribute ' . $attr_name . ' has a type constraint' ); isa_ok( $attr->type_constraint, 'Moose::Meta::TypeConstraint' ); is( $attr->type_constraint->name, 'Int', - '... Attribute ' . $attr_name . ' has an Int type constraint' ); + 'Attribute ' . $attr_name . ' has an Int type constraint' ); } # poke at Point3D @@ -374,7 +374,7 @@ foreach my $attr_name (@Point_attrs) { is_deeply( [ Point3D->meta->superclasses ], ['Point'], - '... Point3D gets the parent given to it' + 'Point3D gets the parent given to it' ); my @Point3D_methods = qw( meta z clear ); @@ -383,29 +383,29 @@ my @Point3D_attrs = ('z'); is_deeply( [ sort @Point3D_methods ], [ sort Point3D->meta->get_method_list() ], - '... we match the method list for Point3D' + 'we match the method list for Point3D' ); is_deeply( [ sort @Point3D_attrs ], [ sort Point3D->meta->get_attribute_list() ], - '... we match the attribute list for Point3D' + 'we match the attribute list for Point3D' ); foreach my $method (@Point3D_methods) { ok( Point3D->meta->has_method($method), - '... Point3D has the method "' . $method . '"' ); + 'Point3D has the method "' . $method . '"' ); } foreach my $attr_name (@Point3D_attrs) { ok( Point3D->meta->has_attribute($attr_name), - '... Point3D has the attribute "' . $attr_name . '"' ); + 'Point3D has the attribute "' . $attr_name . '"' ); my $attr = Point3D->meta->get_attribute($attr_name); ok( $attr->has_type_constraint, - '... Attribute ' . $attr_name . ' has a type constraint' ); + 'Attribute ' . $attr_name . ' has a type constraint' ); isa_ok( $attr->type_constraint, 'Moose::Meta::TypeConstraint' ); is( $attr->type_constraint->name, 'Int', - '... Attribute ' . $attr_name . ' has an Int type constraint' ); + 'Attribute ' . $attr_name . ' has an Int type constraint' ); } =end testing diff --git a/lib/Moose/Cookbook/Basics/Recipe2.pod b/lib/Moose/Cookbook/Basics/Recipe2.pod index 832dea7..d180a38 100644 --- a/lib/Moose/Cookbook/Basics/Recipe2.pod +++ b/lib/Moose/Cookbook/Basics/Recipe2.pod @@ -235,17 +235,17 @@ my $savings_account; $savings_account = BankAccount->new( balance => 250 ); isa_ok( $savings_account, 'BankAccount' ); - is( $savings_account->balance, 250, '... got the right savings balance' ); + is( $savings_account->balance, 250, 'got the right savings balance' ); lives_ok { $savings_account->withdraw(50); } - '... withdrew from savings successfully'; + 'withdrew from savings successfully'; is( $savings_account->balance, 200, - '... got the right savings balance after withdrawl' ); + 'got the right savings balance after withdrawl' ); $savings_account->deposit(150); is( $savings_account->balance, 350, - '... got the right savings balance after deposit' ); + 'got the right savings balance after deposit' ); } { @@ -257,29 +257,29 @@ my $savings_account; isa_ok( $checking_account, 'BankAccount' ); is( $checking_account->overdraft_account, $savings_account, - '... got the right overdraft account' ); + 'got the right overdraft account' ); is( $checking_account->balance, 100, - '... got the right checkings balance' ); + 'got the right checkings balance' ); lives_ok { $checking_account->withdraw(50); } - '... withdrew from checking successfully'; + 'withdrew from checking successfully'; is( $checking_account->balance, 50, - '... got the right checkings balance after withdrawl' ); + 'got the right checkings balance after withdrawl' ); is( $savings_account->balance, 350, - '... got the right savings balance after checking withdrawl (no overdraft)' + 'got the right savings balance after checking withdrawl (no overdraft)' ); lives_ok { $checking_account->withdraw(200); } - '... withdrew from checking successfully'; + 'withdrew from checking successfully'; is( $checking_account->balance, 0, - '... got the right checkings balance after withdrawl' ); + 'got the right checkings balance after withdrawl' ); is( $savings_account->balance, 200, - '... got the right savings balance after overdraft withdrawl' ); + 'got the right savings balance after overdraft withdrawl' ); } { @@ -292,24 +292,24 @@ my $savings_account; isa_ok( $checking_account, 'BankAccount' ); is( $checking_account->overdraft_account, undef, - '... no overdraft account' ); + 'no overdraft account' ); is( $checking_account->balance, 100, - '... got the right checkings balance' ); + 'got the right checkings balance' ); lives_ok { $checking_account->withdraw(50); } - '... withdrew from checking successfully'; + 'withdrew from checking successfully'; is( $checking_account->balance, 50, - '... got the right checkings balance after withdrawl' ); + 'got the right checkings balance after withdrawl' ); dies_ok { $checking_account->withdraw(200); } - '... withdrawl failed due to attempted overdraft'; + 'withdrawl failed due to attempted overdraft'; is( $checking_account->balance, 50, - '... got the right checkings balance after withdrawl failure' ); + 'got the right checkings balance after withdrawl failure' ); } =end testing diff --git a/lib/Moose/Cookbook/Basics/Recipe3.pod b/lib/Moose/Cookbook/Basics/Recipe3.pod index 394e09c..4a0bcb8 100644 --- a/lib/Moose/Cookbook/Basics/Recipe3.pod +++ b/lib/Moose/Cookbook/Basics/Recipe3.pod @@ -236,74 +236,74 @@ use Scalar::Util 'isweak'; my $root = BinaryTree->new(node => 'root'); isa_ok($root, 'BinaryTree'); -is($root->node, 'root', '... got the right node value'); +is($root->node, 'root', 'got the right node value'); -ok(!$root->has_left, '... no left node yet'); -ok(!$root->has_right, '... no right node yet'); +ok(!$root->has_left, 'no left node yet'); +ok(!$root->has_right, 'no right node yet'); -ok(!$root->has_parent, '... no parent for root node'); +ok(!$root->has_parent, 'no parent for root node'); # make a left node my $left = $root->left; isa_ok($left, 'BinaryTree'); -is($root->left, $left, '... got the same node (and it is $left)'); -ok($root->has_left, '... we have a left node now'); +is($root->left, $left, 'got the same node (and it is $left)'); +ok($root->has_left, 'we have a left node now'); -ok($left->has_parent, '... lefts has a parent'); -is($left->parent, $root, '... lefts parent is the root'); +ok($left->has_parent, 'lefts has a parent'); +is($left->parent, $root, 'lefts parent is the root'); -ok(isweak($left->{parent}), '... parent is a weakened ref'); +ok(isweak($left->{parent}), 'parent is a weakened ref'); -ok(!$left->has_left, '... $left no left node yet'); -ok(!$left->has_right, '... $left no right node yet'); +ok(!$left->has_left, '$left no left node yet'); +ok(!$left->has_right, '$left no right node yet'); -is($left->node, undef, '... left has got no node value'); +is($left->node, undef, 'left has got no node value'); lives_ok { $left->node('left') -} '... assign to lefts node'; +} 'assign to lefts node'; -is($left->node, 'left', '... left now has a node value'); +is($left->node, 'left', 'left now has a node value'); # make a right node -ok(!$root->has_right, '... still no right node yet'); +ok(!$root->has_right, 'still no right node yet'); -is($root->right->node, undef, '... right has got no node value'); +is($root->right->node, undef, 'right has got no node value'); -ok($root->has_right, '... now we have a right node'); +ok($root->has_right, 'now we have a right node'); my $right = $root->right; isa_ok($right, 'BinaryTree'); lives_ok { $right->node('right') -} '... assign to rights node'; +} 'assign to rights node'; -is($right->node, 'right', '... left now has a node value'); +is($right->node, 'right', 'left now has a node value'); -is($root->right, $right, '... got the same node (and it is $right)'); -ok($root->has_right, '... we have a right node now'); +is($root->right, $right, 'got the same node (and it is $right)'); +ok($root->has_right, 'we have a right node now'); -ok($right->has_parent, '... rights has a parent'); -is($right->parent, $root, '... rights parent is the root'); +ok($right->has_parent, 'rights has a parent'); +is($right->parent, $root, 'rights parent is the root'); -ok(isweak($right->{parent}), '... parent is a weakened ref'); +ok(isweak($right->{parent}), 'parent is a weakened ref'); # make a left node of the left node my $left_left = $left->left; isa_ok($left_left, 'BinaryTree'); -ok($left_left->has_parent, '... left does have a parent'); +ok($left_left->has_parent, 'left does have a parent'); -is($left_left->parent, $left, '... got a parent node (and it is $left)'); -ok($left->has_left, '... we have a left node now'); -is($left->left, $left_left, '... got a left node (and it is $left_left)'); +is($left_left->parent, $left, 'got a parent node (and it is $left)'); +ok($left->has_left, 'we have a left node now'); +is($left->left, $left_left, 'got a left node (and it is $left_left)'); -ok(isweak($left_left->{parent}), '... parent is a weakened ref'); +ok(isweak($left_left->{parent}), 'parent is a weakened ref'); # make a right node of the left node @@ -312,21 +312,21 @@ isa_ok($left_right, 'BinaryTree'); lives_ok { $left->right($left_right) -} '... assign to rights node'; +} 'assign to rights node'; -ok($left_right->has_parent, '... left does have a parent'); +ok($left_right->has_parent, 'left does have a parent'); -is($left_right->parent, $left, '... got a parent node (and it is $left)'); -ok($left->has_right, '... we have a left node now'); -is($left->right, $left_right, '... got a left node (and it is $left_left)'); +is($left_right->parent, $left, 'got a parent node (and it is $left)'); +ok($left->has_right, 'we have a left node now'); +is($left->right, $left_right, 'got a left node (and it is $left_left)'); -ok(isweak($left_right->{parent}), '... parent is a weakened ref'); +ok(isweak($left_right->{parent}), 'parent is a weakened ref'); # and check the error dies_ok { $left_right->right($left_left) -} '... cant assign a node which already has a parent'; +} 'cant assign a node which already has a parent'; =end testing diff --git a/lib/Moose/Cookbook/Basics/Recipe4.pod b/lib/Moose/Cookbook/Basics/Recipe4.pod index 4e3747e..9b1253c 100644 --- a/lib/Moose/Cookbook/Basics/Recipe4.pod +++ b/lib/Moose/Cookbook/Basics/Recipe4.pod @@ -364,20 +364,20 @@ lives_ok { } ); } -'... created the entire company successfully'; +'created the entire company successfully'; isa_ok( $ii, 'Company' ); is( $ii->name, 'Infinity Interactive', - '... got the right name for the company' ); + 'got the right name for the company' ); isa_ok( $ii->address, 'Address' ); is( $ii->address->street, '565 Plandome Rd., Suite 307', - '... got the right street address' ); -is( $ii->address->city, 'Manhasset', '... got the right city' ); -is( $ii->address->state, 'NY', '... got the right state' ); -is( $ii->address->zip_code, 11030, '... got the zip code' ); + 'got the right street address' ); +is( $ii->address->city, 'Manhasset', 'got the right city' ); +is( $ii->address->state, 'NY', 'got the right state' ); +is( $ii->address->zip_code, 11030, 'got the zip code' ); -is( $ii->get_employee_count, 3, '... got the right employee count' ); +is( $ii->get_employee_count, 3, 'got the right employee count' ); # employee #1 @@ -385,24 +385,24 @@ isa_ok( $ii->employees->[0], 'Employee' ); isa_ok( $ii->employees->[0], 'Person' ); is( $ii->employees->[0]->first_name, 'Jeremy', - '... got the right first name' ); -is( $ii->employees->[0]->last_name, 'Shao', '... got the right last name' ); -ok( !$ii->employees->[0]->has_middle_initial, '... no middle initial' ); + 'got the right first name' ); +is( $ii->employees->[0]->last_name, 'Shao', 'got the right last name' ); +ok( !$ii->employees->[0]->has_middle_initial, 'no middle initial' ); is( $ii->employees->[0]->middle_initial, undef, - '... got the right middle initial value' ); + 'got the right middle initial value' ); is( $ii->employees->[0]->full_name, 'Jeremy Shao, President / Senior Consultant', - '... got the right full name' ); + 'got the right full name' ); is( $ii->employees->[0]->title, 'President / Senior Consultant', - '... got the right title' ); -is( $ii->employees->[0]->employer, $ii, '... got the right company' ); + 'got the right title' ); +is( $ii->employees->[0]->employer, $ii, 'got the right company' ); ok( isweak( $ii->employees->[0]->{employer} ), - '... the company is a weak-ref' ); + 'the company is a weak-ref' ); isa_ok( $ii->employees->[0]->address, 'Address' ); is( $ii->employees->[0]->address->city, 'Manhasset', - '... got the right city' ); -is( $ii->employees->[0]->address->state, 'NY', '... got the right state' ); + 'got the right city' ); +is( $ii->employees->[0]->address->state, 'NY', 'got the right state' ); # employee #2 @@ -410,24 +410,24 @@ isa_ok( $ii->employees->[1], 'Employee' ); isa_ok( $ii->employees->[1], 'Person' ); is( $ii->employees->[1]->first_name, 'Tommy', - '... got the right first name' ); -is( $ii->employees->[1]->last_name, 'Lee', '... got the right last name' ); -ok( !$ii->employees->[1]->has_middle_initial, '... no middle initial' ); + 'got the right first name' ); +is( $ii->employees->[1]->last_name, 'Lee', 'got the right last name' ); +ok( !$ii->employees->[1]->has_middle_initial, 'no middle initial' ); is( $ii->employees->[1]->middle_initial, undef, - '... got the right middle initial value' ); + 'got the right middle initial value' ); is( $ii->employees->[1]->full_name, 'Tommy Lee, Vice President / Senior Developer', - '... got the right full name' ); + 'got the right full name' ); is( $ii->employees->[1]->title, 'Vice President / Senior Developer', - '... got the right title' ); -is( $ii->employees->[1]->employer, $ii, '... got the right company' ); + 'got the right title' ); +is( $ii->employees->[1]->employer, $ii, 'got the right company' ); ok( isweak( $ii->employees->[1]->{employer} ), - '... the company is a weak-ref' ); + 'the company is a weak-ref' ); isa_ok( $ii->employees->[1]->address, 'Address' ); is( $ii->employees->[1]->address->city, 'New York', - '... got the right city' ); -is( $ii->employees->[1]->address->state, 'NY', '... got the right state' ); + 'got the right city' ); +is( $ii->employees->[1]->address->state, 'NY', 'got the right state' ); # employee #3 @@ -435,22 +435,22 @@ isa_ok( $ii->employees->[2], 'Employee' ); isa_ok( $ii->employees->[2], 'Person' ); is( $ii->employees->[2]->first_name, 'Stevan', - '... got the right first name' ); -is( $ii->employees->[2]->last_name, 'Little', '... got the right last name' ); -ok( $ii->employees->[2]->has_middle_initial, '... got middle initial' ); + 'got the right first name' ); +is( $ii->employees->[2]->last_name, 'Little', 'got the right last name' ); +ok( $ii->employees->[2]->has_middle_initial, 'got middle initial' ); is( $ii->employees->[2]->middle_initial, 'C', - '... got the right middle initial value' ); + 'got the right middle initial value' ); is( $ii->employees->[2]->full_name, 'Stevan C. Little, Senior Developer', - '... got the right full name' ); + 'got the right full name' ); is( $ii->employees->[2]->title, 'Senior Developer', - '... got the right title' ); -is( $ii->employees->[2]->employer, $ii, '... got the right company' ); + 'got the right title' ); +is( $ii->employees->[2]->employer, $ii, 'got the right company' ); ok( isweak( $ii->employees->[2]->{employer} ), - '... the company is a weak-ref' ); + 'the company is a weak-ref' ); isa_ok( $ii->employees->[2]->address, 'Address' ); -is( $ii->employees->[2]->address->city, 'Madison', '... got the right city' ); -is( $ii->employees->[2]->address->state, 'CT', '... got the right state' ); +is( $ii->employees->[2]->address->city, 'Madison', 'got the right city' ); +is( $ii->employees->[2]->address->state, 'CT', 'got the right state' ); # create new company @@ -460,14 +460,14 @@ isa_ok( $new_company, 'Company' ); my $ii_employees = $ii->employees; foreach my $employee (@$ii_employees) { - is( $employee->employer, $ii, '... has the ii company' ); + is( $employee->employer, $ii, 'has the ii company' ); } $new_company->employees($ii_employees); foreach my $employee ( @{ $new_company->employees } ) { is( $employee->employer, $new_company, - '... has the different company now' ); + 'has the different company now' ); } ## check some error conditions for the subtypes @@ -475,52 +475,52 @@ foreach my $employee ( @{ $new_company->employees } ) { dies_ok { Address->new( street => {} ),; } -'... we die correctly with bad args'; +'we die correctly with bad args'; dies_ok { Address->new( city => {} ),; } -'... we die correctly with bad args'; +'we die correctly with bad args'; dies_ok { Address->new( state => 'British Columbia' ),; } -'... we die correctly with bad args'; +'we die correctly with bad args'; lives_ok { Address->new( state => 'Connecticut' ),; } -'... we live correctly with good args'; +'we live correctly with good args'; dies_ok { Address->new( zip_code => 'AF5J6$' ),; } -'... we die correctly with bad args'; +'we die correctly with bad args'; lives_ok { Address->new( zip_code => '06443' ),; } -'... we live correctly with good args'; +'we live correctly with good args'; dies_ok { Company->new(),; } -'... we die correctly without good args'; +'we die correctly without good args'; lives_ok { Company->new( name => 'Foo' ),; } -'... we live correctly without good args'; +'we live correctly without good args'; dies_ok { Company->new( name => 'Foo', employees => [ Person->new ] ),; } -'... we die correctly with good args'; +'we die correctly with good args'; lives_ok { Company->new( name => 'Foo', employees => [] ),; } -'... we live correctly with good args'; +'we live correctly with good args'; =end testing diff --git a/lib/Moose/Cookbook/Basics/Recipe5.pod b/lib/Moose/Cookbook/Basics/Recipe5.pod index 7b75fd7..0919db6 100644 --- a/lib/Moose/Cookbook/Basics/Recipe5.pod +++ b/lib/Moose/Cookbook/Basics/Recipe5.pod @@ -231,54 +231,54 @@ isa_ok( $r, 'Request' ); isa_ok( $header, 'HTTP::Headers' ); is( $r->headers->content_type, '', - '... got no content type in the header' ); + 'got no content type in the header' ); $r->headers( { content_type => 'text/plain' } ); my $header2 = $r->headers; isa_ok( $header2, 'HTTP::Headers' ); - isnt( $header, $header2, '... created a new HTTP::Header object' ); + isnt( $header, $header2, 'created a new HTTP::Header object' ); is( $header2->content_type, 'text/plain', - '... got the right content type in the header' ); + 'got the right content type in the header' ); $r->headers( [ content_type => 'text/html' ] ); my $header3 = $r->headers; isa_ok( $header3, 'HTTP::Headers' ); - isnt( $header2, $header3, '... created a new HTTP::Header object' ); + isnt( $header2, $header3, 'created a new HTTP::Header object' ); is( $header3->content_type, 'text/html', - '... got the right content type in the header' ); + 'got the right content type in the header' ); $r->headers( HTTP::Headers->new( content_type => 'application/pdf' ) ); my $header4 = $r->headers; isa_ok( $header4, 'HTTP::Headers' ); - isnt( $header3, $header4, '... created a new HTTP::Header object' ); + isnt( $header3, $header4, 'created a new HTTP::Header object' ); is( $header4->content_type, 'application/pdf', - '... got the right content type in the header' ); + 'got the right content type in the header' ); dies_ok { $r->headers('Foo'); } - '... dies when it gets bad params'; + 'dies when it gets bad params'; } { - is( $r->protocol, undef, '... got nothing by default' ); + is( $r->protocol, undef, 'got nothing by default' ); lives_ok { $r->protocol('HTTP/1.0'); } - '... set the protocol correctly'; - is( $r->protocol, 'HTTP/1.0', '... got nothing by default' ); + 'set the protocol correctly'; + is( $r->protocol, 'HTTP/1.0', 'got nothing by default' ); dies_ok { $r->protocol('http/1.0'); } - '... the protocol died with bar params correctly'; + 'the protocol died with bar params correctly'; } { diff --git a/lib/Moose/Cookbook/Basics/Recipe6.pod b/lib/Moose/Cookbook/Basics/Recipe6.pod index dcbc07f..025e1cc 100644 --- a/lib/Moose/Cookbook/Basics/Recipe6.pod +++ b/lib/Moose/Cookbook/Basics/Recipe6.pod @@ -141,7 +141,7 @@ isa_ok( $tps_report, 'TPSReport' ); is( $tps_report->create, q{<page><header/><report type="tps"/><footer/></page>}, - '... got the right TPS report' + 'got the right TPS report' ); =end testing diff --git a/lib/Moose/Cookbook/Meta/Recipe2.pod b/lib/Moose/Cookbook/Meta/Recipe2.pod index 4c38c19..e94032b 100644 --- a/lib/Moose/Cookbook/Meta/Recipe2.pod +++ b/lib/Moose/Cookbook/Meta/Recipe2.pod @@ -283,7 +283,7 @@ my $app = MyApp::Website->new( url => "http://google.com", name => "Google" ); is( $app->dump, q{name: Google The site's URL: http://google.com -}, '... got the expected dump value' +}, 'got the expected dump value' ); =end testing diff --git a/lib/Moose/Cookbook/Meta/Recipe3.pod b/lib/Moose/Cookbook/Meta/Recipe3.pod index fd2cc16..b1cf358 100644 --- a/lib/Moose/Cookbook/Meta/Recipe3.pod +++ b/lib/Moose/Cookbook/Meta/Recipe3.pod @@ -205,7 +205,7 @@ my $app2 is( $app2->dump, q{name: Google The site's URL: http://google.com -}, '... got the expected dump value' +}, 'got the expected dump value' ); diff --git a/lib/Moose/Cookbook/Roles/Recipe1.pod b/lib/Moose/Cookbook/Roles/Recipe1.pod index 6f8ea41..cb917e8 100644 --- a/lib/Moose/Cookbook/Roles/Recipe1.pod +++ b/lib/Moose/Cookbook/Roles/Recipe1.pod @@ -210,9 +210,9 @@ it under the same terms as Perl itself. =begin testing -ok( US::Currency->does('Comparable'), '... US::Currency does Comparable' ); -ok( US::Currency->does('Eq'), '... US::Currency does Eq' ); -ok( US::Currency->does('Printable'), '... US::Currency does Printable' ); +ok( US::Currency->does('Comparable'), 'US::Currency does Comparable' ); +ok( US::Currency->does('Eq'), 'US::Currency does Eq' ); +ok( US::Currency->does('Printable'), 'US::Currency does Printable' ); my $hundred = US::Currency->new( amount => 100.00 ); isa_ok( $hundred, 'US::Currency' ); @@ -221,45 +221,45 @@ ok( $hundred->DOES("US::Currency"), "UNIVERSAL::DOES for class" ); ok( $hundred->DOES("Comparable"), "UNIVERSAL::DOES for role" ); can_ok( $hundred, 'amount' ); -is( $hundred->amount, 100, '... got the right amount' ); +is( $hundred->amount, 100, 'got the right amount' ); can_ok( $hundred, 'to_string' ); is( $hundred->to_string, '$100.00 USD', - '... got the right stringified value' ); + 'got the right stringified value' ); -ok( $hundred->does('Comparable'), '... US::Currency does Comparable' ); -ok( $hundred->does('Eq'), '... US::Currency does Eq' ); -ok( $hundred->does('Printable'), '... US::Currency does Printable' ); +ok( $hundred->does('Comparable'), 'US::Currency does Comparable' ); +ok( $hundred->does('Eq'), 'US::Currency does Eq' ); +ok( $hundred->does('Printable'), 'US::Currency does Printable' ); my $fifty = US::Currency->new( amount => 50.00 ); isa_ok( $fifty, 'US::Currency' ); can_ok( $fifty, 'amount' ); -is( $fifty->amount, 50, '... got the right amount' ); +is( $fifty->amount, 50, 'got the right amount' ); can_ok( $fifty, 'to_string' ); -is( $fifty->to_string, '$50.00 USD', '... got the right stringified value' ); - -ok( $hundred->greater_than($fifty), '... 100 gt 50' ); -ok( $hundred->greater_than_or_equal_to($fifty), '... 100 ge 50' ); -ok( !$hundred->less_than($fifty), '... !100 lt 50' ); -ok( !$hundred->less_than_or_equal_to($fifty), '... !100 le 50' ); -ok( !$hundred->equal_to($fifty), '... !100 eq 50' ); -ok( $hundred->not_equal_to($fifty), '... 100 ne 50' ); - -ok( !$fifty->greater_than($hundred), '... !50 gt 100' ); -ok( !$fifty->greater_than_or_equal_to($hundred), '... !50 ge 100' ); -ok( $fifty->less_than($hundred), '... 50 lt 100' ); -ok( $fifty->less_than_or_equal_to($hundred), '... 50 le 100' ); -ok( !$fifty->equal_to($hundred), '... !50 eq 100' ); -ok( $fifty->not_equal_to($hundred), '... 50 ne 100' ); - -ok( !$fifty->greater_than($fifty), '... !50 gt 50' ); -ok( $fifty->greater_than_or_equal_to($fifty), '... !50 ge 50' ); -ok( !$fifty->less_than($fifty), '... 50 lt 50' ); -ok( $fifty->less_than_or_equal_to($fifty), '... 50 le 50' ); -ok( $fifty->equal_to($fifty), '... 50 eq 50' ); -ok( !$fifty->not_equal_to($fifty), '... !50 ne 50' ); +is( $fifty->to_string, '$50.00 USD', 'got the right stringified value' ); + +ok( $hundred->greater_than($fifty), '100 gt 50' ); +ok( $hundred->greater_than_or_equal_to($fifty), '100 ge 50' ); +ok( !$hundred->less_than($fifty), '!100 lt 50' ); +ok( !$hundred->less_than_or_equal_to($fifty), '!100 le 50' ); +ok( !$hundred->equal_to($fifty), '!100 eq 50' ); +ok( $hundred->not_equal_to($fifty), '100 ne 50' ); + +ok( !$fifty->greater_than($hundred), '!50 gt 100' ); +ok( !$fifty->greater_than_or_equal_to($hundred), '!50 ge 100' ); +ok( $fifty->less_than($hundred), '50 lt 100' ); +ok( $fifty->less_than_or_equal_to($hundred), '50 le 100' ); +ok( !$fifty->equal_to($hundred), '!50 eq 100' ); +ok( $fifty->not_equal_to($hundred), '50 ne 100' ); + +ok( !$fifty->greater_than($fifty), '!50 gt 50' ); +ok( $fifty->greater_than_or_equal_to($fifty), '!50 ge 50' ); +ok( !$fifty->less_than($fifty), '50 lt 50' ); +ok( $fifty->less_than_or_equal_to($fifty), '50 le 50' ); +ok( $fifty->equal_to($fifty), '50 eq 50' ); +ok( !$fifty->not_equal_to($fifty), '!50 ne 50' ); ## ... check some meta-stuff @@ -268,16 +268,16 @@ ok( !$fifty->not_equal_to($fifty), '... !50 ne 50' ); my $eq_meta = Eq->meta; isa_ok( $eq_meta, 'Moose::Meta::Role' ); -ok( $eq_meta->has_method('not_equal_to'), '... Eq has_method not_equal_to' ); +ok( $eq_meta->has_method('not_equal_to'), 'Eq has_method not_equal_to' ); ok( $eq_meta->requires_method('equal_to'), - '... Eq requires_method not_equal_to' ); + 'Eq requires_method not_equal_to' ); # Comparable my $comparable_meta = Comparable->meta; isa_ok( $comparable_meta, 'Moose::Meta::Role' ); -ok( $comparable_meta->does_role('Eq'), '... Comparable does Eq' ); +ok( $comparable_meta->does_role('Eq'), 'Comparable does Eq' ); foreach my $method_name ( qw( @@ -287,11 +287,11 @@ foreach my $method_name ( ) ) { ok( $comparable_meta->has_method($method_name), - '... Comparable has_method ' . $method_name ); + 'Comparable has_method ' . $method_name ); } ok( $comparable_meta->requires_method('compare'), - '... Comparable requires_method compare' ); + 'Comparable requires_method compare' ); # Printable @@ -299,7 +299,7 @@ my $printable_meta = Printable->meta; isa_ok( $printable_meta, 'Moose::Meta::Role' ); ok( $printable_meta->requires_method('to_string'), - '... Printable requires_method to_string' ); + 'Printable requires_method to_string' ); # US::Currency @@ -307,10 +307,10 @@ my $currency_meta = US::Currency->meta; isa_ok( $currency_meta, 'Moose::Meta::Class' ); ok( $currency_meta->does_role('Comparable'), - '... US::Currency does Comparable' ); -ok( $currency_meta->does_role('Eq'), '... US::Currency does Eq' ); + 'US::Currency does Comparable' ); +ok( $currency_meta->does_role('Eq'), 'US::Currency does Eq' ); ok( $currency_meta->does_role('Printable'), - '... US::Currency does Printable' ); + 'US::Currency does Printable' ); foreach my $method_name ( qw( @@ -323,7 +323,7 @@ foreach my $method_name ( ) ) { ok( $currency_meta->has_method($method_name), - '... US::Currency has_method ' . $method_name ); + 'US::Currency has_method ' . $method_name ); } =end testing diff --git a/lib/Moose/Cookbook/Roles/Recipe2.pod b/lib/Moose/Cookbook/Roles/Recipe2.pod index 366d7e1..ba21765 100644 --- a/lib/Moose/Cookbook/Roles/Recipe2.pod +++ b/lib/Moose/Cookbook/Roles/Recipe2.pod @@ -168,11 +168,11 @@ it under the same terms as Perl itself. $broken->start(); - is( $cnt, 1, '... start called explode' ); + is( $cnt, 1, 'start called explode' ); $broken->stop(); - is( $cnt, 2, '... stop also called explode' ); + is( $cnt, 2, 'stop also called explode' ); } =end testing diff --git a/t/010_basics/001_basic_class_setup.t b/t/010_basics/001_basic_class_setup.t index 16ef006..de21d9b 100644 --- a/t/010_basics/001_basic_class_setup.t +++ b/t/010_basics/001_basic_class_setup.t @@ -17,16 +17,16 @@ use Test::Exception; can_ok('Foo', 'meta'); isa_ok(Foo->meta, 'Moose::Meta::Class'); -ok(Foo->meta->has_method('meta'), '... we got the &meta method'); -ok(Foo->isa('Moose::Object'), '... Foo is automagically a Moose::Object'); +ok(Foo->meta->has_method('meta'), 'we got the &meta method'); +ok(Foo->isa('Moose::Object'), 'Foo is automagically a Moose::Object'); dies_ok { Foo->meta->has_method() -} '... has_method requires an arg'; +} 'has_method requires an arg'; dies_ok { Foo->meta->has_method('') -} '... has_method requires an arg'; +} 'has_method requires an arg'; can_ok('Foo', 'does'); @@ -39,7 +39,7 @@ foreach my $function (qw( coerce from via find_type_constraint )) { - ok(!Foo->meta->has_method($function), '... the meta does not treat "' . $function . '" as a method'); + ok(!Foo->meta->has_method($function), 'the meta does not treat "' . $function . '" as a method'); } foreach my $import (qw( diff --git a/t/010_basics/003_super_and_override.t b/t/010_basics/003_super_and_override.t index 9484082..d619fcb 100644 --- a/t/010_basics/003_super_and_override.t +++ b/t/010_basics/003_super_and_override.t @@ -39,24 +39,24 @@ isa_ok($baz, 'Baz'); isa_ok($baz, 'Bar'); isa_ok($baz, 'Foo'); -is($baz->foo(), 'Foo::foo', '... got the right value from &foo'); -is($baz->bar(), 'Baz::bar -> Bar::bar -> Foo::bar', '... got the right value from &bar'); -is($baz->baz(), 'Baz::baz -> Foo::baz', '... got the right value from &baz'); +is($baz->foo(), 'Foo::foo', 'got the right value from &foo'); +is($baz->bar(), 'Baz::bar -> Bar::bar -> Foo::bar', 'got the right value from &bar'); +is($baz->baz(), 'Baz::baz -> Foo::baz', 'got the right value from &baz'); my $bar = Bar->new(); isa_ok($bar, 'Bar'); isa_ok($bar, 'Foo'); -is($bar->foo(), 'Foo::foo', '... got the right value from &foo'); -is($bar->bar(), 'Bar::bar -> Foo::bar', '... got the right value from &bar'); -is($bar->baz(), 'Foo::baz', '... got the right value from &baz'); +is($bar->foo(), 'Foo::foo', 'got the right value from &foo'); +is($bar->bar(), 'Bar::bar -> Foo::bar', 'got the right value from &bar'); +is($bar->baz(), 'Foo::baz', 'got the right value from &baz'); my $foo = Foo->new(); isa_ok($foo, 'Foo'); -is($foo->foo(), 'Foo::foo', '... got the right value from &foo'); -is($foo->bar(), 'Foo::bar', '... got the right value from &bar'); -is($foo->baz(), 'Foo::baz', '... got the right value from &baz'); +is($foo->foo(), 'Foo::foo', 'got the right value from &foo'); +is($foo->bar(), 'Foo::bar', 'got the right value from &bar'); +is($foo->baz(), 'Foo::baz', 'got the right value from &baz'); # some error cases @@ -75,7 +75,7 @@ is($foo->baz(), 'Foo::baz', '... got the right value from &baz'); ::dies_ok { override 'bling' => sub {}; - } '... cannot override a method which has a local equivalent'; + } 'cannot override a method which has a local equivalent'; } diff --git a/t/010_basics/004_inner_and_augment.t b/t/010_basics/004_inner_and_augment.t index 4957d26..b994f6f 100644 --- a/t/010_basics/004_inner_and_augment.t +++ b/t/010_basics/004_inner_and_augment.t @@ -44,24 +44,24 @@ isa_ok($baz, 'Baz'); isa_ok($baz, 'Bar'); isa_ok($baz, 'Foo'); -is($baz->foo(), 'Foo::foo(Bar::foo(Baz::foo))', '... got the right value from &foo'); -is($baz->bar(), 'Foo::bar(Bar::bar)', '... got the right value from &bar'); -is($baz->baz(), 'Foo::baz(Baz::baz)', '... got the right value from &baz'); +is($baz->foo(), 'Foo::foo(Bar::foo(Baz::foo))', 'got the right value from &foo'); +is($baz->bar(), 'Foo::bar(Bar::bar)', 'got the right value from &bar'); +is($baz->baz(), 'Foo::baz(Baz::baz)', 'got the right value from &baz'); my $bar = Bar->new(); isa_ok($bar, 'Bar'); isa_ok($bar, 'Foo'); -is($bar->foo(), 'Foo::foo(Bar::foo())', '... got the right value from &foo'); -is($bar->bar(), 'Foo::bar(Bar::bar)', '... got the right value from &bar'); -is($bar->baz(), 'Foo::baz()', '... got the right value from &baz'); +is($bar->foo(), 'Foo::foo(Bar::foo())', 'got the right value from &foo'); +is($bar->bar(), 'Foo::bar(Bar::bar)', 'got the right value from &bar'); +is($bar->baz(), 'Foo::baz()', 'got the right value from &baz'); my $foo = Foo->new(); isa_ok($foo, 'Foo'); -is($foo->foo(), 'Foo::foo()', '... got the right value from &foo'); -is($foo->bar(), 'Foo::bar()', '... got the right value from &bar'); -is($foo->baz(), 'Foo::baz()', '... got the right value from &baz'); +is($foo->foo(), 'Foo::foo()', 'got the right value from &foo'); +is($foo->bar(), 'Foo::bar()', 'got the right value from &bar'); +is($foo->baz(), 'Foo::baz()', 'got the right value from &baz'); # some error cases @@ -80,7 +80,7 @@ is($foo->baz(), 'Foo::baz()', '... got the right value from &baz'); ::dies_ok { augment 'bling' => sub {}; - } '... cannot augment a method which has a local equivalent'; + } 'cannot augment a method which has a local equivalent'; } diff --git a/t/010_basics/005_override_augment_inner_super.t b/t/010_basics/005_override_augment_inner_super.t index 295601e..b4891d9 100644 --- a/t/010_basics/005_override_augment_inner_super.t +++ b/t/010_basics/005_override_augment_inner_super.t @@ -48,7 +48,7 @@ then calls Bar::foo. Confusing I know,.. but this is is($baz->foo, 'Baz::foo -> Foo::foo(Bar::foo)', - '... got the right value from mixed augment/override foo'); + 'got the right value from mixed augment/override foo'); =pod @@ -67,4 +67,4 @@ Confusing I know, but it is correct :) is($baz->bar, 'Bar::bar -> Foo::bar(Baz::bar)', - '... got the right value from mixed augment/override bar'); + 'got the right value from mixed augment/override bar'); diff --git a/t/010_basics/006_override_and_foreign_classes.t b/t/010_basics/006_override_and_foreign_classes.t index 28907aa..24ff44a 100644 --- a/t/010_basics/006_override_and_foreign_classes.t +++ b/t/010_basics/006_override_and_foreign_classes.t @@ -53,21 +53,21 @@ isa_ok($baz, 'Baz'); isa_ok($baz, 'Bar'); isa_ok($baz, 'Foo'); -is($baz->foo(), 'Foo::foo', '... got the right value from &foo'); -is($baz->bar(), 'Baz::bar -> Bar::bar -> Foo::bar', '... got the right value from &bar'); -is($baz->baz(), 'Baz::baz -> Foo::baz', '... got the right value from &baz'); +is($baz->foo(), 'Foo::foo', 'got the right value from &foo'); +is($baz->bar(), 'Baz::bar -> Bar::bar -> Foo::bar', 'got the right value from &bar'); +is($baz->baz(), 'Baz::baz -> Foo::baz', 'got the right value from &baz'); my $bar = Bar->new(); isa_ok($bar, 'Bar'); isa_ok($bar, 'Foo'); -is($bar->foo(), 'Foo::foo', '... got the right value from &foo'); -is($bar->bar(), 'Bar::bar -> Foo::bar', '... got the right value from &bar'); -is($bar->baz(), 'Foo::baz', '... got the right value from &baz'); +is($bar->foo(), 'Foo::foo', 'got the right value from &foo'); +is($bar->bar(), 'Bar::bar -> Foo::bar', 'got the right value from &bar'); +is($bar->baz(), 'Foo::baz', 'got the right value from &baz'); my $foo = Foo->new(); isa_ok($foo, 'Foo'); -is($foo->foo(), 'Foo::foo', '... got the right value from &foo'); -is($foo->bar(), 'Foo::bar', '... got the right value from &bar'); -is($foo->baz(), 'Foo::baz', '... got the right value from &baz'); \ No newline at end of file +is($foo->foo(), 'Foo::foo', 'got the right value from &foo'); +is($foo->bar(), 'Foo::bar', 'got the right value from &bar'); +is($foo->baz(), 'Foo::baz', 'got the right value from &baz'); \ No newline at end of file diff --git a/t/010_basics/007_always_strict_warnings.t b/t/010_basics/007_always_strict_warnings.t index 8112ed4..dc66ffa 100644 --- a/t/010_basics/007_always_strict_warnings.t +++ b/t/010_basics/007_always_strict_warnings.t @@ -8,18 +8,18 @@ use Test::More tests => 15; use Moose; eval '$foo = 5;'; - ::ok($@, '... got an error because strict is on'); - ::like($@, qr/Global symbol \"\$foo\" requires explicit package name at/, '... got the right error'); + ::ok($@, 'got an error because strict is on'); + ::like($@, qr/Global symbol \"\$foo\" requires explicit package name at/, 'got the right error'); { my $warn; local $SIG{__WARN__} = sub { $warn = $_[0] }; - ::ok(!$warn, '... no warning yet'); + ::ok(!$warn, 'no warning yet'); eval 'my $bar = 1 + "hello"'; - ::ok($warn, '... got a warning'); + ::ok($warn, 'got a warning'); ::like($warn, qr/Argument \"hello\" isn\'t numeric in addition \(\+\)/, '.. and it is the right warning'); } } @@ -30,18 +30,18 @@ use Test::More tests => 15; use Moose::Role; eval '$foo = 5;'; - ::ok($@, '... got an error because strict is on'); - ::like($@, qr/Global symbol \"\$foo\" requires explicit package name at/, '... got the right error'); + ::ok($@, 'got an error because strict is on'); + ::like($@, qr/Global symbol \"\$foo\" requires explicit package name at/, 'got the right error'); { my $warn; local $SIG{__WARN__} = sub { $warn = $_[0] }; - ::ok(!$warn, '... no warning yet'); + ::ok(!$warn, 'no warning yet'); eval 'my $bar = 1 + "hello"'; - ::ok($warn, '... got a warning'); + ::ok($warn, 'got a warning'); ::like($warn, qr/Argument \"hello\" isn\'t numeric in addition \(\+\)/, '.. and it is the right warning'); } } @@ -52,18 +52,18 @@ use Test::More tests => 15; use Moose::Exporter; eval '$foo = 5;'; - ::ok($@, '... got an error because strict is on'); - ::like($@, qr/Global symbol \"\$foo\" requires explicit package name at/, '... got the right error'); + ::ok($@, 'got an error because strict is on'); + ::like($@, qr/Global symbol \"\$foo\" requires explicit package name at/, 'got the right error'); { my $warn; local $SIG{__WARN__} = sub { $warn = $_[0] }; - ::ok(!$warn, '... no warning yet'); + ::ok(!$warn, 'no warning yet'); eval 'my $bar = 1 + "hello"'; - ::ok($warn, '... got a warning'); + ::ok($warn, 'got a warning'); ::like($warn, qr/Argument \"hello\" isn\'t numeric in addition \(\+\)/, '.. and it is the right warning'); } } diff --git a/t/010_basics/009_import_unimport.t b/t/010_basics/009_import_unimport.t index f956bee..570f5cb 100644 --- a/t/010_basics/009_import_unimport.t +++ b/t/010_basics/009_import_unimport.t @@ -31,7 +31,7 @@ can_ok('Foo', $_) for @moose_exports; die $@ if $@; } -ok(!Foo->can($_), '... Foo can no longer do ' . $_) for @moose_exports; +ok(!Foo->can($_), 'Foo can no longer do ' . $_) for @moose_exports; # and check the type constraints as well @@ -58,7 +58,7 @@ can_ok('Bar', $_) for @moose_type_constraint_exports; die $@ if $@; } -ok(!Bar->can($_), '... Bar can no longer do ' . $_) for @moose_type_constraint_exports; +ok(!Bar->can($_), 'Bar can no longer do ' . $_) for @moose_type_constraint_exports; { diff --git a/t/010_basics/010_method_modifier_with_regexp.t b/t/010_basics/010_method_modifier_with_regexp.t index 64553f7..104e74d 100644 --- a/t/010_basics/010_method_modifier_with_regexp.t +++ b/t/010_basics/010_method_modifier_with_regexp.t @@ -72,15 +72,15 @@ is( $Cat::AFTER_BARK_COUNTER, 2, 'after modifier is called twice' ); ::dies_ok { before qr/bark.*/ => sub {}; - } '... this is not currently supported'; + } 'this is not currently supported'; ::dies_ok { around qr/bark.*/ => sub {}; - } '... this is not currently supported'; + } 'this is not currently supported'; ::dies_ok { after qr/bark.*/ => sub {}; - } '... this is not currently supported'; + } 'this is not currently supported'; } diff --git a/t/010_basics/011_moose_respects_type_constraints.t b/t/010_basics/011_moose_respects_type_constraints.t index 764df60..6ec1ce0 100644 --- a/t/010_basics/011_moose_respects_type_constraints.t +++ b/t/010_basics/011_moose_respects_type_constraints.t @@ -35,10 +35,10 @@ BEGIN { my $foo_constraint = find_type_constraint('Foo'); isa_ok($foo_constraint, 'Moose::Meta::TypeConstraint'); -is($foo_constraint->parent->name, 'Value', '... got the Value subtype for Foo'); +is($foo_constraint->parent->name, 'Value', 'got the Value subtype for Foo'); -ok($foo_constraint->check('Foo'), '... my constraint passed correctly'); -ok(!$foo_constraint->check('Bar'), '... my constraint failed correctly'); +ok($foo_constraint->check('Foo'), 'my constraint passed correctly'); +ok(!$foo_constraint->check('Bar'), 'my constraint failed correctly'); { package Bar; @@ -52,11 +52,11 @@ isa_ok($bar, 'Bar'); lives_ok { $bar->foo('Foo'); -} '... checked the type constraint correctly'; +} 'checked the type constraint correctly'; dies_ok { $bar->foo(Foo->new); -} '... checked the type constraint correctly'; +} 'checked the type constraint correctly'; diff --git a/t/010_basics/012_rebless.t b/t/010_basics/012_rebless.t index 04a0880..845446d 100644 --- a/t/010_basics/012_rebless.t +++ b/t/010_basics/012_rebless.t @@ -63,10 +63,10 @@ lives_ok { $foo->type_constrained(10.5) } "Num type constraint for now.."; # try to rebless, except it will fail due to Child's stricter type constraint throws_ok { Child->meta->rebless_instance($foo) } qr/^Attribute \(type_constrained\) does not pass the type constraint because\: Validation failed for 'Int' failed with value 10\.5/, -'... this failed cause of type check'; +'this failed cause of type check'; throws_ok { Child->meta->rebless_instance($bar) } qr/^Attribute \(type_constrained\) does not pass the type constraint because\: Validation failed for 'Int' failed with value 5\.5/, -'... this failed cause of type check';; +'this failed cause of type check';; $foo->type_constrained(10); $bar->type_constrained(5); @@ -82,4 +82,4 @@ is($bar->lazy_classname, 'Child', "lazy attribute just now initialized"); throws_ok { $foo->type_constrained(10.5) } qr/^Attribute \(type_constrained\) does not pass the type constraint because\: Validation failed for 'Int' failed with value 10\.5/, -'... this failed cause of type check'; +'this failed cause of type check'; diff --git a/t/010_basics/015_buildargs.t b/t/010_basics/015_buildargs.t index ac291a1..a34d436 100644 --- a/t/010_basics/015_buildargs.t +++ b/t/010_basics/015_buildargs.t @@ -30,13 +30,13 @@ foreach my $class qw(Foo Bar) { is( $class->new( 37 )->bar, 37, "single arg" ); { my $o = $class->new(bar => 42, baz => 47); - is($o->bar, 42, '... got the right bar'); - is($o->baz, 47, '... got the right bar'); + is($o->bar, 42, 'got the right bar'); + is($o->baz, 47, 'got the right bar'); } { my $o = $class->new(42, baz => 47); - is($o->bar, 42, '... got the right bar'); - is($o->baz, 47, '... got the right bar'); + is($o->bar, 42, 'got the right bar'); + is($o->baz, 47, 'got the right bar'); } } diff --git a/t/020_attributes/001_attribute_reader_generation.t b/t/020_attributes/001_attribute_reader_generation.t index 407633d..3e6db15 100644 --- a/t/020_attributes/001_attribute_reader_generation.t +++ b/t/020_attributes/001_attribute_reader_generation.t @@ -17,7 +17,7 @@ use Test::Exception; reader => 'get_foo' ); }; - ::ok(!$@, '... created the reader method okay'); + ::ok(!$@, 'created the reader method okay'); eval { has 'lazy_foo' => ( @@ -26,7 +26,7 @@ use Test::Exception; default => sub { 10 } ); }; - ::ok(!$@, '... created the lazy reader method okay') or warn $@; + ::ok(!$@, 'created the lazy reader method okay') or warn $@; my $warn; @@ -36,7 +36,7 @@ use Test::Exception; reder => 'get_mftnpy' ); }; - ::ok($warn, '... got a warning for mispelled attribute argument'); + ::ok($warn, 'got a warning for mispelled attribute argument'); } { @@ -44,18 +44,18 @@ use Test::Exception; isa_ok($foo, 'Foo'); can_ok($foo, 'get_foo'); - is($foo->get_foo(), undef, '... got an undefined value'); + is($foo->get_foo(), undef, 'got an undefined value'); dies_ok { $foo->get_foo(100); - } '... get_foo is a read-only'; + } 'get_foo is a read-only'; - ok(!exists($foo->{lazy_foo}), '... no value in get_lazy_foo slot'); + ok(!exists($foo->{lazy_foo}), 'no value in get_lazy_foo slot'); can_ok($foo, 'get_lazy_foo'); - is($foo->get_lazy_foo(), 10, '... got an deferred value'); + is($foo->get_lazy_foo(), 10, 'got an deferred value'); dies_ok { $foo->get_lazy_foo(100); - } '... get_lazy_foo is a read-only'; + } 'get_lazy_foo is a read-only'; } { @@ -79,8 +79,8 @@ use Test::Exception; my $foo = Foo->new(foo => 10, lazy_foo => 100); isa_ok($foo, 'Foo'); - is($foo->get_foo(), 10, '... got the correct value'); - is($foo->get_lazy_foo(), 100, '... got the correct value'); + is($foo->get_foo(), 10, 'got the correct value'); + is($foo->get_lazy_foo(), 100, 'got the correct value'); } diff --git a/t/020_attributes/002_attribute_writer_generation.t b/t/020_attributes/002_attribute_writer_generation.t index f7f776c..2badf5e 100644 --- a/t/020_attributes/002_attribute_writer_generation.t +++ b/t/020_attributes/002_attribute_writer_generation.t @@ -20,7 +20,7 @@ use Scalar::Util 'isweak'; writer => 'set_foo', ); }; - ::ok(!$@, '... created the writer method okay'); + ::ok(!$@, 'created the writer method okay'); eval { has 'foo_required' => ( @@ -29,7 +29,7 @@ use Scalar::Util 'isweak'; required => 1, ); }; - ::ok(!$@, '... created the required writer method okay'); + ::ok(!$@, 'created the required writer method okay'); eval { has 'foo_int' => ( @@ -38,7 +38,7 @@ use Scalar::Util 'isweak'; isa => 'Int', ); }; - ::ok(!$@, '... created the writer method with type constraint okay'); + ::ok(!$@, 'created the writer method with type constraint okay'); eval { has 'foo_weak' => ( @@ -47,7 +47,7 @@ use Scalar::Util 'isweak'; weak_ref => 1 ); }; - ::ok(!$@, '... created the writer method with weak_ref okay'); + ::ok(!$@, 'created the writer method with weak_ref okay'); } { @@ -57,64 +57,64 @@ use Scalar::Util 'isweak'; # regular writer can_ok($foo, 'set_foo'); - is($foo->get_foo(), undef, '... got an unset value'); + is($foo->get_foo(), undef, 'got an unset value'); lives_ok { $foo->set_foo(100); - } '... set_foo wrote successfully'; - is($foo->get_foo(), 100, '... got the correct set value'); + } 'set_foo wrote successfully'; + is($foo->get_foo(), 100, 'got the correct set value'); - ok(!isweak($foo->{foo}), '... it is not a weak reference'); + ok(!isweak($foo->{foo}), 'it is not a weak reference'); # required writer dies_ok { Foo->new; - } '... cannot create without the required attribute'; + } 'cannot create without the required attribute'; can_ok($foo, 'set_foo_required'); - is($foo->get_foo_required(), 'required', '... got an unset value'); + is($foo->get_foo_required(), 'required', 'got an unset value'); lives_ok { $foo->set_foo_required(100); - } '... set_foo_required wrote successfully'; - is($foo->get_foo_required(), 100, '... got the correct set value'); + } 'set_foo_required wrote successfully'; + is($foo->get_foo_required(), 100, 'got the correct set value'); dies_ok { $foo->set_foo_required(); - } '... set_foo_required died successfully with no value'; + } 'set_foo_required died successfully with no value'; lives_ok { $foo->set_foo_required(undef); - } '... set_foo_required did accept undef'; + } 'set_foo_required did accept undef'; - ok(!isweak($foo->{foo_required}), '... it is not a weak reference'); + ok(!isweak($foo->{foo_required}), 'it is not a weak reference'); # with type constraint can_ok($foo, 'set_foo_int'); - is($foo->get_foo_int(), undef, '... got an unset value'); + is($foo->get_foo_int(), undef, 'got an unset value'); lives_ok { $foo->set_foo_int(100); - } '... set_foo_int wrote successfully'; - is($foo->get_foo_int(), 100, '... got the correct set value'); + } 'set_foo_int wrote successfully'; + is($foo->get_foo_int(), 100, 'got the correct set value'); dies_ok { $foo->set_foo_int("Foo"); - } '... set_foo_int died successfully'; + } 'set_foo_int died successfully'; - ok(!isweak($foo->{foo_int}), '... it is not a weak reference'); + ok(!isweak($foo->{foo_int}), 'it is not a weak reference'); # with weak_ref my $test = []; can_ok($foo, 'set_foo_weak'); - is($foo->get_foo_weak(), undef, '... got an unset value'); + is($foo->get_foo_weak(), undef, 'got an unset value'); lives_ok { $foo->set_foo_weak($test); - } '... set_foo_weak wrote successfully'; - is($foo->get_foo_weak(), $test, '... got the correct set value'); + } 'set_foo_weak wrote successfully'; + is($foo->get_foo_weak(), $test, 'got the correct set value'); - ok(isweak($foo->{foo_weak}), '... it is a weak reference'); + ok(isweak($foo->{foo_weak}), 'it is a weak reference'); } diff --git a/t/020_attributes/003_attribute_accessor_generation.t b/t/020_attributes/003_attribute_accessor_generation.t index 73487c1..a33c22c 100644 --- a/t/020_attributes/003_attribute_accessor_generation.t +++ b/t/020_attributes/003_attribute_accessor_generation.t @@ -19,7 +19,7 @@ use Scalar::Util 'isweak'; accessor => 'foo', ); }; - ::ok(!$@, '... created the accessor method okay'); + ::ok(!$@, 'created the accessor method okay'); eval { has 'lazy_foo' => ( @@ -28,7 +28,7 @@ use Scalar::Util 'isweak'; default => sub { 10 } ); }; - ::ok(!$@, '... created the lazy accessor method okay'); + ::ok(!$@, 'created the lazy accessor method okay'); eval { @@ -37,7 +37,7 @@ use Scalar::Util 'isweak'; required => 1, ); }; - ::ok(!$@, '... created the required accessor method okay'); + ::ok(!$@, 'created the required accessor method okay'); eval { has 'foo_int' => ( @@ -45,7 +45,7 @@ use Scalar::Util 'isweak'; isa => 'Int', ); }; - ::ok(!$@, '... created the accessor method with type constraint okay'); + ::ok(!$@, 'created the accessor method with type constraint okay'); eval { has 'foo_weak' => ( @@ -53,7 +53,7 @@ use Scalar::Util 'isweak'; weak_ref => 1 ); }; - ::ok(!$@, '... created the accessor method with weak_ref okay'); + ::ok(!$@, 'created the accessor method with weak_ref okay'); eval { has 'foo_deref' => ( @@ -62,7 +62,7 @@ use Scalar::Util 'isweak'; auto_deref => 1, ); }; - ::ok(!$@, '... created the accessor method with auto_deref okay'); + ::ok(!$@, 'created the accessor method with auto_deref okay'); eval { has 'foo_deref_ro' => ( @@ -71,7 +71,7 @@ use Scalar::Util 'isweak'; auto_deref => 1, ); }; - ::ok(!$@, '... created the reader method with auto_deref okay'); + ::ok(!$@, 'created the reader method with auto_deref okay'); eval { has 'foo_deref_hash' => ( @@ -80,7 +80,7 @@ use Scalar::Util 'isweak'; auto_deref => 1, ); }; - ::ok(!$@, '... created the reader method with auto_deref okay'); + ::ok(!$@, 'created the reader method with auto_deref okay'); } { @@ -90,72 +90,72 @@ use Scalar::Util 'isweak'; # regular accessor can_ok($foo, 'foo'); - is($foo->foo(), undef, '... got an unset value'); + is($foo->foo(), undef, 'got an unset value'); lives_ok { $foo->foo(100); - } '... foo wrote successfully'; - is($foo->foo(), 100, '... got the correct set value'); + } 'foo wrote successfully'; + is($foo->foo(), 100, 'got the correct set value'); - ok(!isweak($foo->{foo}), '... it is not a weak reference'); + ok(!isweak($foo->{foo}), 'it is not a weak reference'); # required writer dies_ok { Foo->new; - } '... cannot create without the required attribute'; + } 'cannot create without the required attribute'; can_ok($foo, 'foo_required'); - is($foo->foo_required(), 'required', '... got an unset value'); + is($foo->foo_required(), 'required', 'got an unset value'); lives_ok { $foo->foo_required(100); - } '... foo_required wrote successfully'; - is($foo->foo_required(), 100, '... got the correct set value'); + } 'foo_required wrote successfully'; + is($foo->foo_required(), 100, 'got the correct set value'); lives_ok { $foo->foo_required(undef); - } '... foo_required did not die with undef'; + } 'foo_required did not die with undef'; is($foo->foo_required, undef, "value is undef"); - ok(!isweak($foo->{foo_required}), '... it is not a weak reference'); + ok(!isweak($foo->{foo_required}), 'it is not a weak reference'); # lazy - ok(!exists($foo->{lazy_foo}), '... no value in lazy_foo slot'); + ok(!exists($foo->{lazy_foo}), 'no value in lazy_foo slot'); can_ok($foo, 'lazy_foo'); - is($foo->lazy_foo(), 10, '... got an deferred value'); + is($foo->lazy_foo(), 10, 'got an deferred value'); # with type constraint can_ok($foo, 'foo_int'); - is($foo->foo_int(), undef, '... got an unset value'); + is($foo->foo_int(), undef, 'got an unset value'); lives_ok { $foo->foo_int(100); - } '... foo_int wrote successfully'; - is($foo->foo_int(), 100, '... got the correct set value'); + } 'foo_int wrote successfully'; + is($foo->foo_int(), 100, 'got the correct set value'); dies_ok { $foo->foo_int("Foo"); - } '... foo_int died successfully'; + } 'foo_int died successfully'; - ok(!isweak($foo->{foo_int}), '... it is not a weak reference'); + ok(!isweak($foo->{foo_int}), 'it is not a weak reference'); # with weak_ref my $test = []; can_ok($foo, 'foo_weak'); - is($foo->foo_weak(), undef, '... got an unset value'); + is($foo->foo_weak(), undef, 'got an unset value'); lives_ok { $foo->foo_weak($test); - } '... foo_weak wrote successfully'; - is($foo->foo_weak(), $test, '... got the correct set value'); + } 'foo_weak wrote successfully'; + is($foo->foo_weak(), $test, 'got the correct set value'); - ok(isweak($foo->{foo_weak}), '... it is a weak reference'); + ok(isweak($foo->{foo_weak}), 'it is a weak reference'); can_ok( $foo, 'foo_deref'); - is_deeply( [$foo->foo_deref()], [], '... default default value'); + is_deeply( [$foo->foo_deref()], [], 'default default value'); my @list; lives_ok { @list = $foo->foo_deref(); @@ -164,7 +164,7 @@ use Scalar::Util 'isweak'; lives_ok { $foo->foo_deref( [ qw/foo bar gorch/ ] ); - } '... foo_deref wrote successfully'; + } 'foo_deref wrote successfully'; is( Scalar::Util::reftype( scalar $foo->foo_deref() ), "ARRAY", "returns an array reference in scalar context" ); is_deeply( scalar($foo->foo_deref()), [ qw/foo bar gorch/ ], "correct array" ); @@ -196,7 +196,7 @@ use Scalar::Util 'isweak'; lives_ok { $foo->foo_deref_hash( { foo => 1, bar => 2 } ); - } '... foo_deref_hash wrote successfully'; + } 'foo_deref_hash wrote successfully'; is_deeply( scalar($foo->foo_deref_hash), { foo => 1, bar => 2 }, "scalar context" ); diff --git a/t/020_attributes/004_attribute_triggers.t b/t/020_attributes/004_attribute_triggers.t index 974879d..8b5d74e 100644 --- a/t/020_attributes/004_attribute_triggers.t +++ b/t/020_attributes/004_attribute_triggers.t @@ -53,30 +53,30 @@ use Test::Exception; lives_ok { $foo->bar($bar); - } '... did not die setting bar'; + } 'did not die setting bar'; - is($foo->bar, $bar, '... set the value foo.bar correctly'); - is($bar->foo, $foo, '... which in turn set the value bar.foo correctly'); + is($foo->bar, $bar, 'set the value foo.bar correctly'); + is($bar->foo, $foo, 'which in turn set the value bar.foo correctly'); - ok(isweak($bar->{foo}), '... bar.foo is a weak reference'); + ok(isweak($bar->{foo}), 'bar.foo is a weak reference'); lives_ok { $foo->bar(undef); - } '... did not die un-setting bar'; + } 'did not die un-setting bar'; - is($foo->bar, undef, '... set the value foo.bar correctly'); - is($bar->foo, $foo, '... which in turn set the value bar.foo correctly'); + is($foo->bar, undef, 'set the value foo.bar correctly'); + is($bar->foo, $foo, 'which in turn set the value bar.foo correctly'); # test the writer lives_ok { $foo->set_baz($baz); - } '... did not die setting baz'; + } 'did not die setting baz'; - is($foo->get_baz, $baz, '... set the value foo.baz correctly'); - is($baz->foo, $foo, '... which in turn set the value baz.foo correctly'); + is($foo->get_baz, $baz, 'set the value foo.baz correctly'); + is($baz->foo, $foo, 'which in turn set the value baz.foo correctly'); - ok(isweak($baz->{foo}), '... baz.foo is a weak reference'); + ok(isweak($baz->{foo}), 'baz.foo is a weak reference'); } { @@ -89,15 +89,15 @@ use Test::Exception; my $foo = Foo->new(bar => $bar, baz => $baz); isa_ok($foo, 'Foo'); - is($foo->bar, $bar, '... set the value foo.bar correctly'); - is($bar->foo, $foo, '... which in turn set the value bar.foo correctly'); + is($foo->bar, $bar, 'set the value foo.bar correctly'); + is($bar->foo, $foo, 'which in turn set the value bar.foo correctly'); - ok(isweak($bar->{foo}), '... bar.foo is a weak reference'); + ok(isweak($bar->{foo}), 'bar.foo is a weak reference'); - is($foo->get_baz, $baz, '... set the value foo.baz correctly'); - is($baz->foo, $foo, '... which in turn set the value baz.foo correctly'); + is($foo->get_baz, $baz, 'set the value foo.baz correctly'); + is($baz->foo, $foo, 'which in turn set the value baz.foo correctly'); - ok(isweak($baz->{foo}), '... baz.foo is a weak reference'); + ok(isweak($baz->{foo}), 'baz.foo is a weak reference'); } # some errors @@ -108,11 +108,11 @@ use Test::Exception; ::dies_ok { has('bling' => (is => 'rw', trigger => 'Fail')); - } '... a trigger must be a CODE ref'; + } 'a trigger must be a CODE ref'; ::dies_ok { has('bling' => (is => 'rw', trigger => [])); - } '... a trigger must be a CODE ref'; + } 'a trigger must be a CODE ref'; } # Triggers do not fire on built values diff --git a/t/020_attributes/005_attribute_does.t b/t/020_attributes/005_attribute_does.t index b0ef886..66dee66 100644 --- a/t/020_attributes/005_attribute_does.t +++ b/t/020_attributes/005_attribute_does.t @@ -50,23 +50,23 @@ isa_ok($bar, 'Bar::Class'); lives_ok { $foo->bar($bar); -} '... bar passed the type constraint okay'; +} 'bar passed the type constraint okay'; dies_ok { $foo->bar($foo); -} '... foo did not pass the type constraint okay'; +} 'foo did not pass the type constraint okay'; lives_ok { $foo->baz($bar); -} '... baz passed the type constraint okay'; +} 'baz passed the type constraint okay'; dies_ok { $foo->baz($foo); -} '... foo did not pass the type constraint okay'; +} 'foo did not pass the type constraint okay'; lives_ok { $bar->foo($foo); -} '... foo passed the type constraint okay'; +} 'foo passed the type constraint okay'; @@ -80,7 +80,7 @@ lives_ok { # if it does not,.. we have a conflict... so we die loudly ::dies_ok { has 'foo' => (isa => 'Foo::Class', does => 'Bar::Class'); - } '... cannot have a does() which is not done by the isa()'; + } 'cannot have a does() which is not done by the isa()'; } { @@ -97,7 +97,7 @@ lives_ok { # if it does not,.. we have a conflict... so we die loudly ::dies_ok { has 'foo' => (isa => 'Bling', does => 'Bar::Class'); - } '... cannot have a isa() which is cannot does()'; + } 'cannot have a isa() which is cannot does()'; } diff --git a/t/020_attributes/006_attribute_required.t b/t/020_attributes/006_attribute_required.t index 0975765..1551483 100644 --- a/t/020_attributes/006_attribute_required.t +++ b/t/020_attributes/006_attribute_required.t @@ -21,48 +21,48 @@ use Test::Exception; my $foo = Foo->new(bar => 10, baz => 20, boo => 100); isa_ok($foo, 'Foo'); - is($foo->bar, 10, '... got the right bar'); - is($foo->baz, 20, '... got the right baz'); - is($foo->boo, 100, '... got the right boo'); + is($foo->bar, 10, 'got the right bar'); + is($foo->baz, 20, 'got the right baz'); + is($foo->boo, 100, 'got the right boo'); } { my $foo = Foo->new(bar => 10, boo => 5); isa_ok($foo, 'Foo'); - is($foo->bar, 10, '... got the right bar'); - is($foo->baz, 100, '... got the right baz'); - is($foo->boo, 5, '... got the right boo'); + is($foo->bar, 10, 'got the right bar'); + is($foo->baz, 100, 'got the right baz'); + is($foo->boo, 5, 'got the right boo'); } { my $foo = Foo->new(bar => 10); isa_ok($foo, 'Foo'); - is($foo->bar, 10, '... got the right bar'); - is($foo->baz, 100, '... got the right baz'); - is($foo->boo, 50, '... got the right boo'); + is($foo->bar, 10, 'got the right bar'); + is($foo->baz, 100, 'got the right baz'); + is($foo->boo, 50, 'got the right boo'); } #Yeah.. this doesn't work like this anymore, see below. (groditi) #throws_ok { # Foo->new(bar => 10, baz => undef); -#} qr/^Attribute \(baz\) is required and cannot be undef/, '... must supply all the required attribute'; +#} qr/^Attribute \(baz\) is required and cannot be undef/, 'must supply all the required attribute'; #throws_ok { # Foo->new(bar => 10, boo => undef); -#} qr/^Attribute \(boo\) is required and cannot be undef/, '... must supply all the required attribute'; +#} qr/^Attribute \(boo\) is required and cannot be undef/, 'must supply all the required attribute'; lives_ok { Foo->new(bar => 10, baz => undef); -} '... undef is a valid attribute value'; +} 'undef is a valid attribute value'; lives_ok { Foo->new(bar => 10, boo => undef); -} '... undef is a valid attribute value'; +} 'undef is a valid attribute value'; throws_ok { Foo->new; -} qr/^Attribute \(bar\) is required/, '... must supply all the required attribute'; +} qr/^Attribute \(bar\) is required/, 'must supply all the required attribute'; diff --git a/t/020_attributes/007_attribute_custom_metaclass.t b/t/020_attributes/007_attribute_custom_metaclass.t index 25c3d1b..1af6393 100644 --- a/t/020_attributes/007_attribute_custom_metaclass.t +++ b/t/020_attributes/007_attribute_custom_metaclass.t @@ -34,16 +34,16 @@ use Test::Exception; isa_ok($foo_attr, 'Foo::Meta::Attribute'); isa_ok($foo_attr, 'Moose::Meta::Attribute'); - is($foo_attr->name, 'foo', '... got the right name for our meta-attribute'); - ok($foo_attr->has_accessor, '... our meta-attrubute created the accessor for us'); + is($foo_attr->name, 'foo', 'got the right name for our meta-attribute'); + ok($foo_attr->has_accessor, 'our meta-attrubute created the accessor for us'); - ok($foo_attr->has_type_constraint, '... our meta-attrubute created the type_constraint for us'); + ok($foo_attr->has_type_constraint, 'our meta-attrubute created the type_constraint for us'); my $foo_attr_type_constraint = $foo_attr->type_constraint; isa_ok($foo_attr_type_constraint, 'Moose::Meta::TypeConstraint'); - is($foo_attr_type_constraint->name, 'Foo', '... got the right type constraint name'); - is($foo_attr_type_constraint->parent->name, 'Object', '... got the right type constraint parent name'); + is($foo_attr_type_constraint->name, 'Foo', 'got the right type constraint name'); + is($foo_attr_type_constraint->parent->name, 'Object', 'got the right type constraint parent name'); } { package Bar::Meta::Attribute; @@ -56,7 +56,7 @@ use Test::Exception; ::lives_ok { has 'bar' => (metaclass => 'Bar::Meta::Attribute'); - } '... the attribute metaclass need not be a Moose::Meta::Attribute as long as it behaves'; + } 'the attribute metaclass need not be a Moose::Meta::Attribute as long as it behaves'; } { @@ -73,11 +73,11 @@ use Test::Exception; ::lives_ok { has 'foo' => (metaclass => 'Foo'); - } '... the attribute metaclass alias worked correctly'; + } 'the attribute metaclass alias worked correctly'; ::lives_ok { has 'bar' => (metaclass => 'Bar', is => 'bare'); - } '... the attribute metaclass alias worked correctly'; + } 'the attribute metaclass alias worked correctly'; } { diff --git a/t/020_attributes/008_attribute_type_unions.t b/t/020_attributes/008_attribute_type_unions.t index 86dfbcf..5dd7da5 100644 --- a/t/020_attributes/008_attribute_type_unions.t +++ b/t/020_attributes/008_attribute_type_unions.t @@ -20,37 +20,37 @@ isa_ok($foo, 'Foo'); lives_ok { $foo->bar([]) -} '... set bar successfully with an ARRAY ref'; +} 'set bar successfully with an ARRAY ref'; lives_ok { $foo->bar({}) -} '... set bar successfully with a HASH ref'; +} 'set bar successfully with a HASH ref'; dies_ok { $foo->bar(100) -} '... couldnt set bar successfully with a number'; +} 'couldnt set bar successfully with a number'; dies_ok { $foo->bar(sub {}) -} '... couldnt set bar successfully with a CODE ref'; +} 'couldnt set bar successfully with a CODE ref'; # check the constructor lives_ok { Foo->new(bar => []) -} '... created new Foo with bar successfully set with an ARRAY ref'; +} 'created new Foo with bar successfully set with an ARRAY ref'; lives_ok { Foo->new(bar => {}) -} '... created new Foo with bar successfully set with a HASH ref'; +} 'created new Foo with bar successfully set with a HASH ref'; dies_ok { Foo->new(bar => 50) -} '... didnt create a new Foo with bar as a number'; +} 'didnt create a new Foo with bar as a number'; dies_ok { Foo->new(bar => sub {}) -} '... didnt create a new Foo with bar as a CODE ref'; +} 'didnt create a new Foo with bar as a CODE ref'; { package Bar; @@ -64,36 +64,36 @@ isa_ok($bar, 'Bar'); lives_ok { $bar->baz('a string') -} '... set baz successfully with a string'; +} 'set baz successfully with a string'; lives_ok { $bar->baz(sub { 'a sub' }) -} '... set baz successfully with a CODE ref'; +} 'set baz successfully with a CODE ref'; dies_ok { $bar->baz(\(my $var1)) -} '... couldnt set baz successfully with a SCALAR ref'; +} 'couldnt set baz successfully with a SCALAR ref'; dies_ok { $bar->baz({}) -} '... couldnt set bar successfully with a HASH ref'; +} 'couldnt set bar successfully with a HASH ref'; # check the constructor lives_ok { Bar->new(baz => 'a string') -} '... created new Bar with baz successfully set with a string'; +} 'created new Bar with baz successfully set with a string'; lives_ok { Bar->new(baz => sub { 'a sub' }) -} '... created new Bar with baz successfully set with a CODE ref'; +} 'created new Bar with baz successfully set with a CODE ref'; dies_ok { Bar->new(baz => \(my $var2)) -} '... didnt create a new Bar with baz as a number'; +} 'didnt create a new Bar with baz as a number'; dies_ok { Bar->new(baz => {}) -} '... didnt create a new Bar with baz as a HASH ref'; +} 'didnt create a new Bar with baz as a HASH ref'; diff --git a/t/020_attributes/009_attribute_inherited_slot_specs.t b/t/020_attributes/009_attribute_inherited_slot_specs.t index 62c1958..e716d0d 100644 --- a/t/020_attributes/009_attribute_inherited_slot_specs.t +++ b/t/020_attributes/009_attribute_inherited_slot_specs.t @@ -54,211 +54,211 @@ use Test::Exception; ::lives_ok { has '+bar' => (default => 'Bar::bar'); - } '... we can change the default attribute option'; + } 'we can change the default attribute option'; ::lives_ok { has '+baz' => (isa => 'ArrayRef'); - } '... we can add change the isa as long as it is a subtype'; + } 'we can add change the isa as long as it is a subtype'; ::lives_ok { has '+foo' => (coerce => 1); - } '... we can change/add coerce as an attribute option'; + } 'we can change/add coerce as an attribute option'; ::lives_ok { has '+gorch' => (required => 1); - } '... we can change/add required as an attribute option'; + } 'we can change/add required as an attribute option'; ::lives_ok { has '+gloum' => (lazy => 1); - } '... we can change/add lazy as an attribute option'; + } 'we can change/add lazy as an attribute option'; ::lives_ok { has '+gloum' => (lazy_build => 1); - } '... we can add lazy_build as an attribute option'; + } 'we can add lazy_build as an attribute option'; ::lives_ok { has '+bunch_of_stuff' => (isa => 'ArrayRef[Int]'); - } '... extend an attribute with parameterized type'; + } 'extend an attribute with parameterized type'; ::lives_ok { has '+one_last_one' => (isa => subtype('Ref', where { blessed $_ eq 'CODE' })); - } '... extend an attribute with anon-subtype'; + } 'extend an attribute with anon-subtype'; ::lives_ok { has '+one_last_one' => (isa => 'Value'); - } '... now can extend an attribute with a non-subtype'; + } 'now can extend an attribute with a non-subtype'; ::lives_ok { has '+fleem' => (weak_ref => 1); - } '... now allowed to add the weak_ref option via inheritance'; + } 'now allowed to add the weak_ref option via inheritance'; ::lives_ok { has '+bling' => (handles => ['hello']); - } '... we can add the handles attribute option'; + } 'we can add the handles attribute option'; # this one will *not* work here .... ::dies_ok { has '+blang' => (handles => ['hello']); - } '... we can not alter the handles attribute option'; + } 'we can not alter the handles attribute option'; ::lives_ok { has '+fail' => (isa => 'Ref'); - } '... can now create an attribute with an improper subtype relation'; + } 'can now create an attribute with an improper subtype relation'; ::dies_ok { has '+other_fail' => (trigger => sub {}); - } '... cannot create an attribute with an illegal option'; + } 'cannot create an attribute with an illegal option'; ::throws_ok { has '+does_not_exist' => (isa => 'Str'); - } qr/in Bar/, '... cannot extend a non-existing attribute'; + } qr/in Bar/, 'cannot extend a non-existing attribute'; } my $foo = Foo->new; isa_ok($foo, 'Foo'); -is($foo->foo, undef, '... got the right undef default value'); -lives_ok { $foo->foo('FooString') } '... assigned foo correctly'; -is($foo->foo, 'FooString', '... got the right value for foo'); +is($foo->foo, undef, 'got the right undef default value'); +lives_ok { $foo->foo('FooString') } 'assigned foo correctly'; +is($foo->foo, 'FooString', 'got the right value for foo'); -dies_ok { $foo->foo([]) } '... foo is not coercing (as expected)'; +dies_ok { $foo->foo([]) } 'foo is not coercing (as expected)'; -is($foo->bar, 'Foo::bar', '... got the right default value'); -dies_ok { $foo->bar(10) } '... Foo::bar is a read/only attr'; +is($foo->bar, 'Foo::bar', 'got the right default value'); +dies_ok { $foo->bar(10) } 'Foo::bar is a read/only attr'; -is($foo->baz, undef, '... got the right undef default value'); +is($foo->baz, undef, 'got the right undef default value'); { my $hash_ref = {}; - lives_ok { $foo->baz($hash_ref) } '... Foo::baz accepts hash refs'; - is($foo->baz, $hash_ref, '... got the right value assigned to baz'); + lives_ok { $foo->baz($hash_ref) } 'Foo::baz accepts hash refs'; + is($foo->baz, $hash_ref, 'got the right value assigned to baz'); my $array_ref = []; - lives_ok { $foo->baz($array_ref) } '... Foo::baz accepts an array ref'; - is($foo->baz, $array_ref, '... got the right value assigned to baz'); + lives_ok { $foo->baz($array_ref) } 'Foo::baz accepts an array ref'; + is($foo->baz, $array_ref, 'got the right value assigned to baz'); my $scalar_ref = \(my $var); - lives_ok { $foo->baz($scalar_ref) } '... Foo::baz accepts scalar ref'; - is($foo->baz, $scalar_ref, '... got the right value assigned to baz'); + lives_ok { $foo->baz($scalar_ref) } 'Foo::baz accepts scalar ref'; + is($foo->baz, $scalar_ref, 'got the right value assigned to baz'); - lives_ok { $foo->bunch_of_stuff([qw[one two three]]) } '... Foo::bunch_of_stuff accepts an array of strings'; + lives_ok { $foo->bunch_of_stuff([qw[one two three]]) } 'Foo::bunch_of_stuff accepts an array of strings'; - lives_ok { $foo->one_last_one(sub { 'Hello World'}) } '... Foo::one_last_one accepts a code ref'; + lives_ok { $foo->one_last_one(sub { 'Hello World'}) } 'Foo::one_last_one accepts a code ref'; my $code_ref = sub { 1 }; - lives_ok { $foo->baz($code_ref) } '... Foo::baz accepts a code ref'; - is($foo->baz, $code_ref, '... got the right value assigned to baz'); + lives_ok { $foo->baz($code_ref) } 'Foo::baz accepts a code ref'; + is($foo->baz, $code_ref, 'got the right value assigned to baz'); } dies_ok { Bar->new; -} '... cannot create Bar without required gorch param'; +} 'cannot create Bar without required gorch param'; my $bar = Bar->new(gorch => 'Bar::gorch'); isa_ok($bar, 'Bar'); isa_ok($bar, 'Foo'); -is($bar->foo, undef, '... got the right undef default value'); -lives_ok { $bar->foo('FooString') } '... assigned foo correctly'; -is($bar->foo, 'FooString', '... got the right value for foo'); -lives_ok { $bar->foo([]) } '... assigned foo correctly'; -is($bar->foo, 'FooArrayRef', '... got the right value for foo'); +is($bar->foo, undef, 'got the right undef default value'); +lives_ok { $bar->foo('FooString') } 'assigned foo correctly'; +is($bar->foo, 'FooString', 'got the right value for foo'); +lives_ok { $bar->foo([]) } 'assigned foo correctly'; +is($bar->foo, 'FooArrayRef', 'got the right value for foo'); -is($bar->gorch, 'Bar::gorch', '... got the right default value'); +is($bar->gorch, 'Bar::gorch', 'got the right default value'); -is($bar->bar, 'Bar::bar', '... got the right default value'); -dies_ok { $bar->bar(10) } '... Bar::bar is a read/only attr'; +is($bar->bar, 'Bar::bar', 'got the right default value'); +dies_ok { $bar->bar(10) } 'Bar::bar is a read/only attr'; -is($bar->baz, undef, '... got the right undef default value'); +is($bar->baz, undef, 'got the right undef default value'); { my $hash_ref = {}; - dies_ok { $bar->baz($hash_ref) } '... Bar::baz does not accept hash refs'; + dies_ok { $bar->baz($hash_ref) } 'Bar::baz does not accept hash refs'; my $array_ref = []; - lives_ok { $bar->baz($array_ref) } '... Bar::baz can accept an array ref'; - is($bar->baz, $array_ref, '... got the right value assigned to baz'); + lives_ok { $bar->baz($array_ref) } 'Bar::baz can accept an array ref'; + is($bar->baz, $array_ref, 'got the right value assigned to baz'); my $scalar_ref = \(my $var); - dies_ok { $bar->baz($scalar_ref) } '... Bar::baz does not accept a scalar ref'; + dies_ok { $bar->baz($scalar_ref) } 'Bar::baz does not accept a scalar ref'; - lives_ok { $bar->bunch_of_stuff([1, 2, 3]) } '... Bar::bunch_of_stuff accepts an array of ints'; - dies_ok { $bar->bunch_of_stuff([qw[one two three]]) } '... Bar::bunch_of_stuff does not accept an array of strings'; + lives_ok { $bar->bunch_of_stuff([1, 2, 3]) } 'Bar::bunch_of_stuff accepts an array of ints'; + dies_ok { $bar->bunch_of_stuff([qw[one two three]]) } 'Bar::bunch_of_stuff does not accept an array of strings'; my $code_ref = sub { 1 }; - dies_ok { $bar->baz($code_ref) } '... Bar::baz does not accept a code ref'; + dies_ok { $bar->baz($code_ref) } 'Bar::baz does not accept a code ref'; } # check some meta-stuff -ok(Bar->meta->has_attribute('foo'), '... Bar has a foo attr'); -ok(Bar->meta->has_attribute('bar'), '... Bar has a bar attr'); -ok(Bar->meta->has_attribute('baz'), '... Bar has a baz attr'); -ok(Bar->meta->has_attribute('gorch'), '... Bar has a gorch attr'); -ok(Bar->meta->has_attribute('gloum'), '... Bar has a gloum attr'); -ok(Bar->meta->has_attribute('bling'), '... Bar has a bling attr'); -ok(Bar->meta->has_attribute('bunch_of_stuff'), '... Bar does have a bunch_of_stuff attr'); -ok(!Bar->meta->has_attribute('blang'), '... Bar has a blang attr'); -ok(Bar->meta->has_attribute('fail'), '... Bar has a fail attr'); -ok(!Bar->meta->has_attribute('other_fail'), '... Bar does not have an other_fail attr'); +ok(Bar->meta->has_attribute('foo'), 'Bar has a foo attr'); +ok(Bar->meta->has_attribute('bar'), 'Bar has a bar attr'); +ok(Bar->meta->has_attribute('baz'), 'Bar has a baz attr'); +ok(Bar->meta->has_attribute('gorch'), 'Bar has a gorch attr'); +ok(Bar->meta->has_attribute('gloum'), 'Bar has a gloum attr'); +ok(Bar->meta->has_attribute('bling'), 'Bar has a bling attr'); +ok(Bar->meta->has_attribute('bunch_of_stuff'), 'Bar does have a bunch_of_stuff attr'); +ok(!Bar->meta->has_attribute('blang'), 'Bar has a blang attr'); +ok(Bar->meta->has_attribute('fail'), 'Bar has a fail attr'); +ok(!Bar->meta->has_attribute('other_fail'), 'Bar does not have an other_fail attr'); isnt(Foo->meta->get_attribute('foo'), Bar->meta->get_attribute('foo'), - '... Foo and Bar have different copies of foo'); + 'Foo and Bar have different copies of foo'); isnt(Foo->meta->get_attribute('bar'), Bar->meta->get_attribute('bar'), - '... Foo and Bar have different copies of bar'); + 'Foo and Bar have different copies of bar'); isnt(Foo->meta->get_attribute('baz'), Bar->meta->get_attribute('baz'), - '... Foo and Bar have different copies of baz'); + 'Foo and Bar have different copies of baz'); isnt(Foo->meta->get_attribute('gorch'), Bar->meta->get_attribute('gorch'), - '... Foo and Bar have different copies of gorch'); + 'Foo and Bar have different copies of gorch'); isnt(Foo->meta->get_attribute('gloum'), Bar->meta->get_attribute('gloum'), - '... Foo and Bar have different copies of gloum'); + 'Foo and Bar have different copies of gloum'); isnt(Foo->meta->get_attribute('bling'), Bar->meta->get_attribute('bling'), - '... Foo and Bar have different copies of bling'); + 'Foo and Bar have different copies of bling'); isnt(Foo->meta->get_attribute('bunch_of_stuff'), Bar->meta->get_attribute('bunch_of_stuff'), - '... Foo and Bar have different copies of bunch_of_stuff'); + 'Foo and Bar have different copies of bunch_of_stuff'); ok(Bar->meta->get_attribute('bar')->has_type_constraint, - '... Bar::bar inherited the type constraint too'); + 'Bar::bar inherited the type constraint too'); ok(Bar->meta->get_attribute('baz')->has_type_constraint, - '... Bar::baz inherited the type constraint too'); + 'Bar::baz inherited the type constraint too'); is(Bar->meta->get_attribute('bar')->type_constraint->name, - 'Str', '... Bar::bar inherited the right type constraint too'); + 'Str', 'Bar::bar inherited the right type constraint too'); is(Foo->meta->get_attribute('baz')->type_constraint->name, - 'Ref', '... Foo::baz inherited the right type constraint too'); + 'Ref', 'Foo::baz inherited the right type constraint too'); is(Bar->meta->get_attribute('baz')->type_constraint->name, - 'ArrayRef', '... Bar::baz inherited the right type constraint too'); + 'ArrayRef', 'Bar::baz inherited the right type constraint too'); ok(!Foo->meta->get_attribute('gorch')->is_required, - '... Foo::gorch is not a required attr'); + 'Foo::gorch is not a required attr'); ok(Bar->meta->get_attribute('gorch')->is_required, - '... Bar::gorch is a required attr'); + 'Bar::gorch is a required attr'); is(Foo->meta->get_attribute('bunch_of_stuff')->type_constraint->name, 'ArrayRef', - '... Foo::bunch_of_stuff is an ArrayRef'); + 'Foo::bunch_of_stuff is an ArrayRef'); is(Bar->meta->get_attribute('bunch_of_stuff')->type_constraint->name, 'ArrayRef[Int]', - '... Bar::bunch_of_stuff is an ArrayRef[Int]'); + 'Bar::bunch_of_stuff is an ArrayRef[Int]'); ok(!Foo->meta->get_attribute('gloum')->is_lazy, - '... Foo::gloum is not a required attr'); + 'Foo::gloum is not a required attr'); ok(Bar->meta->get_attribute('gloum')->is_lazy, - '... Bar::gloum is a required attr'); + 'Bar::gloum is a required attr'); ok(!Foo->meta->get_attribute('foo')->should_coerce, - '... Foo::foo should not coerce'); + 'Foo::foo should not coerce'); ok(Bar->meta->get_attribute('foo')->should_coerce, - '... Bar::foo should coerce'); + 'Bar::foo should coerce'); ok(!Foo->meta->get_attribute('bling')->has_handles, - '... Foo::foo should not handles'); + 'Foo::foo should not handles'); ok(Bar->meta->get_attribute('bling')->has_handles, - '... Bar::foo should handles'); + 'Bar::foo should handles'); diff --git a/t/020_attributes/010_attribute_delegation.t b/t/020_attributes/010_attribute_delegation.t index 95bd73c..37f12c4 100644 --- a/t/020_attributes/010_attribute_delegation.t +++ b/t/020_attributes/010_attribute_delegation.t @@ -40,7 +40,7 @@ use Test::Exception; my $bar = Bar->new; isa_ok($bar, 'Bar'); -ok($bar->foo, '... we have something in bar->foo'); +ok($bar->foo, 'we have something in bar->foo'); isa_ok($bar->foo, 'Foo'); my $meth = Bar->meta->get_method('foo_bar'); @@ -48,10 +48,10 @@ isa_ok($meth, 'Moose::Meta::Method::Delegation'); is($meth->associated_attribute->name, 'foo', 'associated_attribute->name for this method is foo'); -is($bar->foo->bar, 10, '... bar->foo->bar returned the right default'); +is($bar->foo->bar, 10, 'bar->foo->bar returned the right default'); can_ok($bar, 'foo_bar'); -is($bar->foo_bar, 10, '... bar->foo_bar delegated correctly'); +is($bar->foo_bar, 10, 'bar->foo_bar delegated correctly'); # change the value ... @@ -59,8 +59,8 @@ $bar->foo->bar(30); # and make sure the delegation picks it up -is($bar->foo->bar, 30, '... bar->foo->bar returned the right (changed) value'); -is($bar->foo_bar, 30, '... bar->foo_bar delegated correctly'); +is($bar->foo->bar, 30, 'bar->foo->bar returned the right (changed) value'); +is($bar->foo_bar, 30, 'bar->foo_bar delegated correctly'); # change the value through the delegation ... @@ -68,28 +68,28 @@ $bar->foo_bar(50); # and make sure everyone sees it -is($bar->foo->bar, 50, '... bar->foo->bar returned the right (changed) value'); -is($bar->foo_bar, 50, '... bar->foo_bar delegated correctly'); +is($bar->foo->bar, 50, 'bar->foo->bar returned the right (changed) value'); +is($bar->foo_bar, 50, 'bar->foo_bar delegated correctly'); # change the object we are delegating too my $foo = Foo->new(bar => 25); isa_ok($foo, 'Foo'); -is($foo->bar, 25, '... got the right foo->bar'); +is($foo->bar, 25, 'got the right foo->bar'); lives_ok { $bar->foo($foo); -} '... assigned the new Foo to Bar->foo'; +} 'assigned the new Foo to Bar->foo'; -is($bar->foo, $foo, '... assigned bar->foo with the new Foo'); +is($bar->foo, $foo, 'assigned bar->foo with the new Foo'); -is($bar->foo->bar, 25, '... bar->foo->bar returned the right result'); -is($bar->foo_bar, 25, '... and bar->foo_bar delegated correctly again'); +is($bar->foo->bar, 25, 'bar->foo->bar returned the right result'); +is($bar->foo_bar, 25, 'and bar->foo_bar delegated correctly again'); # curried handles $bar->foo_bar_to_20; -is($bar->foo_bar, 20, '... correctly curried a single argument'); +is($bar->foo_bar, 20, 'correctly curried a single argument'); # ------------------------------------------------------------------- # ARRAY handles @@ -122,14 +122,14 @@ isa_ok($car->engine, 'Engine'); can_ok($car->engine, 'go'); can_ok($car->engine, 'stop'); -is($car->engine->go, 'Engine::go', '... got the right value from ->engine->go'); -is($car->engine->stop, 'Engine::stop', '... got the right value from ->engine->stop'); +is($car->engine->go, 'Engine::go', 'got the right value from ->engine->go'); +is($car->engine->stop, 'Engine::stop', 'got the right value from ->engine->stop'); can_ok($car, 'go'); can_ok($car, 'stop'); -is($car->go, 'Engine::go', '... got the right value from ->go'); -is($car->stop, 'Engine::stop', '... got the right value from ->stop'); +is($car->go, 'Engine::go', 'got the right value from ->go'); +is($car->stop, 'Engine::stop', 'got the right value from ->stop'); # ------------------------------------------------------------------- # REGEXP handles @@ -186,9 +186,9 @@ is($car->stop, 'Engine::stop', '... got the right value from ->stop'); can_ok($baz_proxy, 'bar'); can_ok($baz_proxy, 'boo'); - is($baz_proxy->foo, 'Baz::foo', '... got the right proxied return value'); - is($baz_proxy->bar, 'Baz::bar', '... got the right proxied return value'); - is($baz_proxy->boo, 'Baz::boo', '... got the right proxied return value'); + is($baz_proxy->foo, 'Baz::foo', 'got the right proxied return value'); + is($baz_proxy->bar, 'Baz::bar', 'got the right proxied return value'); + is($baz_proxy->boo, 'Baz::boo', 'got the right proxied return value'); } { my $baz_proxy = Baz::Proxy2->new; @@ -200,8 +200,8 @@ is($car->stop, 'Engine::stop', '... got the right value from ->stop'); can_ok($baz_proxy, 'foo'); can_ok($baz_proxy, 'boo'); - is($baz_proxy->foo, 'Baz::foo', '... got the right proxied return value'); - is($baz_proxy->boo, 'Baz::boo', '... got the right proxied return value'); + is($baz_proxy->foo, 'Baz::foo', 'got the right proxied return value'); + is($baz_proxy->boo, 'Baz::boo', 'got the right proxied return value'); } { my $baz_proxy = Baz::Proxy3->new; @@ -213,8 +213,8 @@ is($car->stop, 'Engine::stop', '... got the right value from ->stop'); can_ok($baz_proxy, 'bar'); can_ok($baz_proxy, 'boo'); - is($baz_proxy->bar, 'Baz::bar', '... got the right proxied return value'); - is($baz_proxy->boo, 'Baz::boo', '... got the right proxied return value'); + is($baz_proxy->bar, 'Baz::bar', 'got the right proxied return value'); + is($baz_proxy->boo, 'Baz::boo', 'got the right proxied return value'); } # ------------------------------------------------------------------- @@ -251,13 +251,13 @@ is($car->stop, 'Engine::stop', '... got the right value from ->stop'); isa_ok($foo, 'Foo::Thing'); isa_ok($foo->thing, 'Foo::Baz'); - ok($foo->meta->has_method('foo'), '... we have the method we expect'); - ok($foo->meta->has_method('bar'), '... we have the method we expect'); - ok(!$foo->meta->has_method('baz'), '... we dont have the method we expect'); + ok($foo->meta->has_method('foo'), 'we have the method we expect'); + ok($foo->meta->has_method('bar'), 'we have the method we expect'); + ok(!$foo->meta->has_method('baz'), 'we dont have the method we expect'); - is($foo->foo, 'Foo::Baz::FOO', '... got the right value'); - is($foo->bar, 'Foo::Baz::BAR', '... got the right value'); - is($foo->thing->baz, 'Foo::Baz::BAZ', '... got the right value'); + is($foo->foo, 'Foo::Baz::FOO', 'got the right value'); + is($foo->bar, 'Foo::Baz::BAR', 'got the right value'); + is($foo->thing->baz, 'Foo::Baz::BAZ', 'got the right value'); } # ------------------------------------------------------------------- @@ -308,7 +308,7 @@ is($car->stop, 'Engine::stop', '... got the right value from ->stop'); default => sub { Foo::Autoloaded->new }, handles => qr/bar/ ); - } '... you cannot delegate to AUTOLOADED class with regexp'; + } 'you cannot delegate to AUTOLOADED class with regexp'; } # check HASH based delegation w/ AUTOLOAD @@ -317,7 +317,7 @@ is($car->stop, 'Engine::stop', '... got the right value from ->stop'); my $bar = Bar::Autoloaded->new; isa_ok($bar, 'Bar::Autoloaded'); - ok($bar->foo, '... we have something in bar->foo'); + ok($bar->foo, 'we have something in bar->foo'); isa_ok($bar->foo, 'Foo::Autoloaded'); # change the value ... @@ -326,8 +326,8 @@ is($car->stop, 'Engine::stop', '... got the right value from ->stop'); # and make sure the delegation picks it up - is($bar->foo->bar, 30, '... bar->foo->bar returned the right (changed) value'); - is($bar->foo_bar, 30, '... bar->foo_bar delegated correctly'); + is($bar->foo->bar, 30, 'bar->foo->bar returned the right (changed) value'); + is($bar->foo_bar, 30, 'bar->foo_bar delegated correctly'); # change the value through the delegation ... @@ -335,8 +335,8 @@ is($car->stop, 'Engine::stop', '... got the right value from ->stop'); # and make sure everyone sees it - is($bar->foo->bar, 50, '... bar->foo->bar returned the right (changed) value'); - is($bar->foo_bar, 50, '... bar->foo_bar delegated correctly'); + is($bar->foo->bar, 50, 'bar->foo->bar returned the right (changed) value'); + is($bar->foo_bar, 50, 'bar->foo_bar delegated correctly'); # change the object we are delegating too @@ -345,16 +345,16 @@ is($car->stop, 'Engine::stop', '... got the right value from ->stop'); $foo->bar(25); - is($foo->bar, 25, '... got the right foo->bar'); + is($foo->bar, 25, 'got the right foo->bar'); lives_ok { $bar->foo($foo); - } '... assigned the new Foo to Bar->foo'; + } 'assigned the new Foo to Bar->foo'; - is($bar->foo, $foo, '... assigned bar->foo with the new Foo'); + is($bar->foo, $foo, 'assigned bar->foo with the new Foo'); - is($bar->foo->bar, 25, '... bar->foo->bar returned the right result'); - is($bar->foo_bar, 25, '... and bar->foo_bar delegated correctly again'); + is($bar->foo->bar, 25, 'bar->foo->bar returned the right result'); + is($bar->foo_bar, 25, 'and bar->foo_bar delegated correctly again'); } # check ARRAY based delegation w/ AUTOLOAD @@ -363,7 +363,7 @@ is($car->stop, 'Engine::stop', '... got the right value from ->stop'); my $baz = Baz::Autoloaded->new; isa_ok($baz, 'Baz::Autoloaded'); - ok($baz->foo, '... we have something in baz->foo'); + ok($baz->foo, 'we have something in baz->foo'); isa_ok($baz->foo, 'Foo::Autoloaded'); # change the value ... @@ -372,8 +372,8 @@ is($car->stop, 'Engine::stop', '... got the right value from ->stop'); # and make sure the delegation picks it up - is($baz->foo->bar, 30, '... baz->foo->bar returned the right (changed) value'); - is($baz->bar, 30, '... baz->foo_bar delegated correctly'); + is($baz->foo->bar, 30, 'baz->foo->bar returned the right (changed) value'); + is($baz->bar, 30, 'baz->foo_bar delegated correctly'); # change the value through the delegation ... @@ -381,8 +381,8 @@ is($car->stop, 'Engine::stop', '... got the right value from ->stop'); # and make sure everyone sees it - is($baz->foo->bar, 50, '... baz->foo->bar returned the right (changed) value'); - is($baz->bar, 50, '... baz->foo_bar delegated correctly'); + is($baz->foo->bar, 50, 'baz->foo->bar returned the right (changed) value'); + is($baz->bar, 50, 'baz->foo_bar delegated correctly'); # change the object we are delegating too @@ -391,16 +391,16 @@ is($car->stop, 'Engine::stop', '... got the right value from ->stop'); $foo->bar(25); - is($foo->bar, 25, '... got the right foo->bar'); + is($foo->bar, 25, 'got the right foo->bar'); lives_ok { $baz->foo($foo); - } '... assigned the new Foo to Baz->foo'; + } 'assigned the new Foo to Baz->foo'; - is($baz->foo, $foo, '... assigned baz->foo with the new Foo'); + is($baz->foo, $foo, 'assigned baz->foo with the new Foo'); - is($baz->foo->bar, 25, '... baz->foo->bar returned the right result'); - is($baz->bar, 25, '... and baz->foo_bar delegated correctly again'); + is($baz->foo->bar, 25, 'baz->foo->bar returned the right result'); + is($baz->bar, 25, 'and baz->foo_bar delegated correctly again'); } # Check that removing attributes removes their handles methods also. diff --git a/t/020_attributes/011_more_attr_delegation.t b/t/020_attributes/011_more_attr_delegation.t index 99a3b40..84f1e1b 100644 --- a/t/020_attributes/011_more_attr_delegation.t +++ b/t/020_attributes/011_more_attr_delegation.t @@ -180,7 +180,7 @@ isa_ok( $p->child_d, "ChildD" ); isa_ok( $p->child_e, "ChildE" ); isa_ok( $p->child_f, "ChildF" ); -ok(!$p->can('child_g'), '... no child_g accessor defined'); +ok(!$p->can('child_g'), 'no child_g accessor defined'); is( $p->parent_method, "p", "parent method" ); diff --git a/t/020_attributes/012_misc_attribute_tests.t b/t/020_attributes/012_misc_attribute_tests.t index b788d7c..e6c0a61 100644 --- a/t/020_attributes/012_misc_attribute_tests.t +++ b/t/020_attributes/012_misc_attribute_tests.t @@ -24,13 +24,13 @@ use Test::Exception; my $foo_attr = Test::Attribute::Inline::Documentation->meta->get_attribute('foo'); - ok($foo_attr->has_documentation, '... the foo has docs'); + ok($foo_attr->has_documentation, 'the foo has docs'); is($foo_attr->documentation, q{ The 'foo' attribute is my favorite attribute in the whole wide world. }, - '... got the foo docs'); + 'got the foo docs'); } { @@ -60,11 +60,11 @@ use Test::Exception; dies_ok { $test->bad_lazy_attr; - } '... this does not work'; + } 'this does not work'; lives_ok { $test->good_lazy_attr; - } '... this does not work'; + } 'this does not work'; } { @@ -121,7 +121,7 @@ use Test::Exception; dies_ok { Test::UndefDefault::Attributes->new; - } '... default must return a value which passes the type constraint'; + } 'default must return a value which passes the type constraint'; } @@ -142,7 +142,7 @@ use Test::Exception; throws_ok { $moose_obj->a_str( $moose_obj ) } qr/Attribute \(a_str\) does not pass the type constraint because\: Validation failed for 'Str' failed with value OverloadedStr=HASH\(0x.+?\)/, - '... dies without overloading the string'; + 'dies without overloading the string'; } @@ -157,11 +157,11 @@ use Test::Exception; throws_ok { OverloadBreaker->new; } qr/Attribute \(a_num\) does not pass the type constraint because\: Validation failed for 'Int' failed with value 7\.5/, - '... this doesnt trip overload to break anymore '; + 'this doesnt trip overload to break anymore '; lives_ok { OverloadBreaker->new(a_num => 5); - } '... this works fine though'; + } 'this works fine though'; } @@ -195,7 +195,7 @@ use Test::Exception; dies_ok { Test::Builder::Attribute::Broken->new; - } '... no builder, wtf'; + } 'no builder, wtf'; } diff --git a/t/020_attributes/013_attr_dereference_test.t b/t/020_attributes/013_attr_dereference_test.t index faa8a15..e4e3238 100644 --- a/t/020_attributes/013_attr_dereference_test.t +++ b/t/020_attributes/013_attr_dereference_test.t @@ -23,7 +23,7 @@ use Test::Exception; (blessed($_) && $_->isa('Customer') || return) for @$_; 1 }), auto_deref => 1, ); - } '... successfully created attr'; + } 'successfully created attr'; } { @@ -38,7 +38,7 @@ use Test::Exception; is_deeply( [ $firm->customers ], [ $customer ], - '... got the right dereferenced value' + 'got the right dereferenced value' ); } @@ -51,7 +51,7 @@ use Test::Exception; is_deeply( [ $firm->customers ], [], - '... got the right dereferenced value' + 'got the right dereferenced value' ); } @@ -71,11 +71,11 @@ use Test::Exception; dies_ok { $autoderef->bar(1, 2, 3); - } '... its auto-de-ref-ing, not auto-en-ref-ing'; + } 'its auto-de-ref-ing, not auto-en-ref-ing'; lives_ok { $autoderef->bar([ 1, 2, 3 ]) - } '... set the results of bar correctly'; + } 'set the results of bar correctly'; - is_deeply [ $autoderef->bar ], [ 1, 2, 3 ], '... auto-dereffed correctly'; + is_deeply [ $autoderef->bar ], [ 1, 2, 3 ], 'auto-dereffed correctly'; } diff --git a/t/020_attributes/014_misc_attribute_coerce_lazy.t b/t/020_attributes/014_misc_attribute_coerce_lazy.t index 5a47246..9f48731 100644 --- a/t/020_attributes/014_misc_attribute_coerce_lazy.t +++ b/t/020_attributes/014_misc_attribute_coerce_lazy.t @@ -45,7 +45,7 @@ isa_ok($r, 'Request'); lives_ok { $r->headers; -} '... this coerces and passes the type constraint even with lazy'; +} 'this coerces and passes the type constraint even with lazy'; diff --git a/t/020_attributes/015_attribute_traits.t b/t/020_attributes/015_attribute_traits.t index fc40435..b4aedbf 100644 --- a/t/020_attributes/015_attribute_traits.t +++ b/t/020_attributes/015_attribute_traits.t @@ -47,22 +47,22 @@ use Test::Moose; my $c = My::Class->new(bar => 100); isa_ok($c, 'My::Class'); -is($c->bar, 100, '... got the right value for bar'); -is($c->gorch, 10, '... got the right value for gorch'); +is($c->bar, 100, 'got the right value for bar'); +is($c->gorch, 10, 'got the right value for gorch'); can_ok($c, 'baz'); -is($c->baz, 100, '... got the right value for baz'); +is($c->baz, 100, 'got the right value for baz'); my $bar_attr = $c->meta->get_attribute('bar'); does_ok($bar_attr, 'My::Attribute::Trait'); -ok($bar_attr->has_applied_traits, '... got the applied traits'); -is_deeply($bar_attr->applied_traits, [qw/My::Attribute::Trait/], '... got the applied traits'); +ok($bar_attr->has_applied_traits, 'got the applied traits'); +is_deeply($bar_attr->applied_traits, [qw/My::Attribute::Trait/], 'got the applied traits'); is($bar_attr->foo, "blah", "attr initialized"); my $gorch_attr = $c->meta->get_attribute('gorch'); -ok(!$gorch_attr->does('My::Attribute::Trait'), '... gorch doesnt do the trait'); -ok(!$gorch_attr->has_applied_traits, '... no traits applied'); -is($gorch_attr->applied_traits, undef, '... no traits applied'); +ok(!$gorch_attr->does('My::Attribute::Trait'), 'gorch doesnt do the trait'); +ok(!$gorch_attr->has_applied_traits, 'no traits applied'); +is($gorch_attr->applied_traits, undef, 'no traits applied'); diff --git a/t/020_attributes/016_attribute_traits_registered.t b/t/020_attributes/016_attribute_traits_registered.t index 91dc88a..0945a1b 100644 --- a/t/020_attributes/016_attribute_traits_registered.t +++ b/t/020_attributes/016_attribute_traits_registered.t @@ -77,10 +77,10 @@ use Test::Moose; my $c = My::Class->new(bar => 100); isa_ok($c, 'My::Class'); -is($c->bar, 100, '... got the right value for bar'); +is($c->bar, 100, 'got the right value for bar'); can_ok($c, 'baz') and -is($c->baz, 100, '... got the right value for baz'); +is($c->baz, 100, 'got the right value for baz'); my $bar_attr = $c->meta->get_attribute('bar'); does_ok($bar_attr, 'My::Attribute::Trait'); @@ -93,10 +93,10 @@ ok(!$bar_attr->does('Fictional'), "attr->does returns false for nonexistent role my $quux = My::Derived::Class->new(bar => 1000); -is($quux->bar, 1000, '... got the right value for bar'); +is($quux->bar, 1000, 'got the right value for bar'); can_ok($quux, 'baz'); -is($quux->baz, 1000, '... got the right value for baz'); +is($quux->baz, 1000, 'got the right value for baz'); my $derived_bar_attr = $quux->meta->get_attribute("bar"); does_ok($derived_bar_attr, 'My::Attribute::Trait' ); @@ -113,5 +113,5 @@ ok(!$derived_bar_attr->meta->does_role('Fictional'), "does_role returns false fo ok(!$derived_bar_attr->does('Fictional'), "attr->does returns false for nonexistent roles"); can_ok($quux, 'additional_method'); -is(eval { $quux->additional_method }, 42, '... got the right value for additional_method'); +is(eval { $quux->additional_method }, 42, 'got the right value for additional_method'); diff --git a/t/020_attributes/017_attribute_traits_n_meta.t b/t/020_attributes/017_attribute_traits_n_meta.t index 2aa1114..a51142d 100644 --- a/t/020_attributes/017_attribute_traits_n_meta.t +++ b/t/020_attributes/017_attribute_traits_n_meta.t @@ -54,14 +54,14 @@ use Test::Moose; my $c = My::Class->new(bar => 100); isa_ok($c, 'My::Class'); -is($c->bar, 100, '... got the right value for bar'); +is($c->bar, 100, 'got the right value for bar'); can_ok($c, 'baz'); -is($c->baz, 100, '... got the right value for baz'); +is($c->baz, 100, 'got the right value for baz'); isa_ok($c->meta->get_attribute('bar'), 'My::Meta::Attribute::DefaultReadOnly'); does_ok($c->meta->get_attribute('bar'), 'My::Attribute::Trait'); -is($c->meta->get_attribute('bar')->_is_metadata, 'ro', '... got the right metaclass customization'); +is($c->meta->get_attribute('bar')->_is_metadata, 'ro', 'got the right metaclass customization'); diff --git a/t/020_attributes/018_no_init_arg.t b/t/020_attributes/018_no_init_arg.t index 62f6e5a..17ae490 100644 --- a/t/020_attributes/018_no_init_arg.t +++ b/t/020_attributes/018_no_init_arg.t @@ -18,7 +18,7 @@ use Test::Exception; init_arg => undef, ); }; - ::ok(!$@, '... created the attr okay'); + ::ok(!$@, 'created the attr okay'); } { diff --git a/t/020_attributes/019_attribute_lazy_initializer.t b/t/020_attributes/019_attribute_lazy_initializer.t index 06f631f..7ee5fcb 100644 --- a/t/020_attributes/019_attribute_lazy_initializer.t +++ b/t/020_attributes/019_attribute_lazy_initializer.t @@ -19,7 +19,7 @@ use Test::Exception; my ($self, $value, $callback, $attr) = @_; ::isa_ok($attr, 'Moose::Meta::Attribute'); - ::is($attr->name, 'foo', '... got the right name'); + ::is($attr->name, 'foo', 'got the right name'); $callback->($value * 2); }, @@ -33,7 +33,7 @@ use Test::Exception; my ($self, $value, $callback, $attr) = @_; ::isa_ok($attr, 'Moose::Meta::Attribute'); - ::is($attr->name, 'lazy_foo', '... got the right name'); + ::is($attr->name, 'lazy_foo', 'got the right name'); $callback->($value * 2); }, @@ -48,7 +48,7 @@ use Test::Exception; my ($self, $value, $callback, $attr) = @_; ::isa_ok($attr, 'Moose::Meta::Attribute'); - ::is($attr->name, 'lazy_foo_w_type', '... got the right name'); + ::is($attr->name, 'lazy_foo_w_type', 'got the right name'); $callback->($value * 2); }, @@ -61,7 +61,7 @@ use Test::Exception; my ($self, $value, $callback, $attr) = @_; ::isa_ok($attr, 'Moose::Meta::Attribute'); - ::is($attr->name, 'lazy_foo_builder', '... got the right name'); + ::is($attr->name, 'lazy_foo_builder', 'got the right name'); $callback->($value * 2); }, @@ -75,7 +75,7 @@ use Test::Exception; my ($self, $value, $callback, $attr) = @_; ::isa_ok($attr, 'Moose::Meta::Attribute'); - ::is($attr->name, 'lazy_foo_builder_w_type', '... got the right name'); + ::is($attr->name, 'lazy_foo_builder_w_type', 'got the right name'); $callback->($value * 2); }, @@ -107,7 +107,7 @@ use Test::Exception; my ($self, $value, $callback, $attr) = @_; ::isa_ok($attr, 'Moose::Meta::Attribute'); - ::is($attr->name, 'foo', '... got the right name'); + ::is($attr->name, 'foo', 'got the right name'); $callback->($value * 2); }, @@ -135,7 +135,7 @@ use Test::Exception; my ($self, $value, $callback, $attr) = @_; ::isa_ok($attr, 'Moose::Meta::Attribute'); - ::is($attr->name, 'foo', '... got the right name'); + ::is($attr->name, 'foo', 'got the right name'); $callback->("Hello $value World"); }, @@ -146,5 +146,5 @@ use Test::Exception; dies_ok { Fail::Bar->new(foo => 10) -} '... this fails, because initializer returns a bad type'; +} 'this fails, because initializer returns a bad type'; diff --git a/t/020_attributes/020_trigger_and_coerce.t b/t/020_attributes/020_trigger_and_coerce.t index 182d03d..5c51639 100644 --- a/t/020_attributes/020_trigger_and_coerce.t +++ b/t/020_attributes/020_trigger_and_coerce.t @@ -28,7 +28,7 @@ use Test::Exception; coerce => 1, trigger => sub { my ( $self, $val ) = @_; - ::pass('... trigger is being called'); + ::pass('trigger is being called'); ::isa_ok( $self->closing_date, 'Fake::DateTime' ); ::isa_ok( $val, 'Fake::DateTime' ); } @@ -44,7 +44,7 @@ use Test::Exception; } Mortgage->meta->make_immutable; -ok( Mortgage->meta->is_immutable, '... Mortgage is now immutable' ); +ok( Mortgage->meta->is_immutable, 'Mortgage is now immutable' ); { my $mtg = Mortgage->new( closing_date => 'yesterday' ); diff --git a/t/020_attributes/022_legal_options_for_inheritance.t b/t/020_attributes/022_legal_options_for_inheritance.t index c44b7d1..ffa48ec 100644 --- a/t/020_attributes/022_legal_options_for_inheritance.t +++ b/t/020_attributes/022_legal_options_for_inheritance.t @@ -45,5 +45,5 @@ my ($legal_option) = grep { $_ eq 'my_legal_option' } $bar_attr->legal_options_for_inheritance; is($legal_option, 'my_legal_option', - '... added my_legal_option as legal option for inheritance' ); -is($bar_attr->my_legal_option->(), 'Bar::B', '... overloaded my_legal_option'); + 'added my_legal_option as legal option for inheritance' ); +is($bar_attr->my_legal_option->(), 'Bar::B', 'overloaded my_legal_option'); diff --git a/t/020_attributes/025_chained_coercion.t b/t/020_attributes/025_chained_coercion.t index 3975200..9a3879a 100644 --- a/t/020_attributes/025_chained_coercion.t +++ b/t/020_attributes/025_chained_coercion.t @@ -44,6 +44,6 @@ my $foo = Foo->new(bar => { baz => { hello => 'World' } }); isa_ok($foo, 'Foo'); isa_ok($foo->bar, 'Bar'); isa_ok($foo->bar->baz, 'Baz'); -is($foo->bar->baz->hello, 'World', '... this all worked fine'); +is($foo->bar->baz->hello, 'World', 'this all worked fine'); diff --git a/t/020_attributes/031_delegation_and_modifiers.t b/t/020_attributes/031_delegation_and_modifiers.t index 78ab291..1e20b93 100644 --- a/t/020_attributes/031_delegation_and_modifiers.t +++ b/t/020_attributes/031_delegation_and_modifiers.t @@ -48,11 +48,11 @@ my $foo = Foo::Extended->new; isa_ok($foo, 'Foo::Extended'); isa_ok($foo, 'Foo'); -ok(!$foo->test, '... the test value has not been changed'); +ok(!$foo->test, 'the test value has not been changed'); -is($foo->baz, 'Bar::baz', '... got the right delegated method'); +is($foo->baz, 'Bar::baz', 'got the right delegated method'); -ok($foo->test, '... the test value has now been changed'); +ok($foo->test, 'the test value has now been changed'); diff --git a/t/030_roles/001_meta_role.t b/t/030_roles/001_meta_role.t index a977ec3..81816d5 100644 --- a/t/030_roles/001_meta_role.t +++ b/t/030_roles/001_meta_role.t @@ -20,87 +20,87 @@ my $foo_role = Moose::Meta::Role->initialize('FooRole'); isa_ok($foo_role, 'Moose::Meta::Role'); isa_ok($foo_role, 'Class::MOP::Module'); -is($foo_role->name, 'FooRole', '... got the right name of FooRole'); -is($foo_role->version, '0.01', '... got the right version of FooRole'); +is($foo_role->name, 'FooRole', 'got the right name of FooRole'); +is($foo_role->version, '0.01', 'got the right version of FooRole'); # methods ... -ok($foo_role->has_method('foo'), '... FooRole has the foo method'); -is($foo_role->get_method('foo')->body, \&FooRole::foo, '... FooRole got the foo method'); +ok($foo_role->has_method('foo'), 'FooRole has the foo method'); +is($foo_role->get_method('foo')->body, \&FooRole::foo, 'FooRole got the foo method'); isa_ok($foo_role->get_method('foo'), 'Moose::Meta::Role::Method'); is_deeply( [ $foo_role->get_method_list() ], [ 'foo' ], - '... got the right method list'); + 'got the right method list'); # attributes ... is_deeply( [ $foo_role->get_attribute_list() ], [], - '... got the right attribute list'); + 'got the right attribute list'); -ok(!$foo_role->has_attribute('bar'), '... FooRole does not have the bar attribute'); +ok(!$foo_role->has_attribute('bar'), 'FooRole does not have the bar attribute'); lives_ok { $foo_role->add_attribute('bar' => (is => 'rw', isa => 'Foo')); -} '... added the bar attribute okay'; +} 'added the bar attribute okay'; is_deeply( [ $foo_role->get_attribute_list() ], [ 'bar' ], - '... got the right attribute list'); + 'got the right attribute list'); -ok($foo_role->has_attribute('bar'), '... FooRole does have the bar attribute'); +ok($foo_role->has_attribute('bar'), 'FooRole does have the bar attribute'); is_deeply( $foo_role->get_attribute('bar'), { is => 'rw', isa => 'Foo' }, - '... got the correct description of the bar attribute'); + 'got the correct description of the bar attribute'); lives_ok { $foo_role->add_attribute('baz' => (is => 'ro')); -} '... added the baz attribute okay'; +} 'added the baz attribute okay'; is_deeply( [ sort $foo_role->get_attribute_list() ], [ 'bar', 'baz' ], - '... got the right attribute list'); + 'got the right attribute list'); -ok($foo_role->has_attribute('baz'), '... FooRole does have the baz attribute'); +ok($foo_role->has_attribute('baz'), 'FooRole does have the baz attribute'); is_deeply( $foo_role->get_attribute('baz'), { is => 'ro' }, - '... got the correct description of the baz attribute'); + 'got the correct description of the baz attribute'); lives_ok { $foo_role->remove_attribute('bar'); -} '... removed the bar attribute okay'; +} 'removed the bar attribute okay'; is_deeply( [ $foo_role->get_attribute_list() ], [ 'baz' ], - '... got the right attribute list'); + 'got the right attribute list'); -ok(!$foo_role->has_attribute('bar'), '... FooRole does not have the bar attribute'); -ok($foo_role->has_attribute('baz'), '... FooRole does still have the baz attribute'); +ok(!$foo_role->has_attribute('bar'), 'FooRole does not have the bar attribute'); +ok($foo_role->has_attribute('baz'), 'FooRole does still have the baz attribute'); # method modifiers -ok(!$foo_role->has_before_method_modifiers('boo'), '... no boo:before modifier'); +ok(!$foo_role->has_before_method_modifiers('boo'), 'no boo:before modifier'); my $method = sub { "FooRole::boo:before" }; lives_ok { $foo_role->add_before_method_modifier('boo' => $method); -} '... added a method modifier okay'; +} 'added a method modifier okay'; -ok($foo_role->has_before_method_modifiers('boo'), '... now we have a boo:before modifier'); -is(($foo_role->get_before_method_modifiers('boo'))[0], $method, '... got the right method back'); +ok($foo_role->has_before_method_modifiers('boo'), 'now we have a boo:before modifier'); +is(($foo_role->get_before_method_modifiers('boo'))[0], $method, 'got the right method back'); is_deeply( [ $foo_role->get_method_modifier_list('before') ], [ 'boo' ], - '... got the right list of before method modifiers'); + 'got the right list of before method modifiers'); diff --git a/t/030_roles/002_role.t b/t/030_roles/002_role.t index 3e0f99f..96ab24f 100644 --- a/t/030_roles/002_role.t +++ b/t/030_roles/002_role.t @@ -38,9 +38,9 @@ words, should 'has_method' return true for them? override 'bling' => sub { "FooRole::bling:override" }; override 'fling' => sub { "FooRole::fling:override" }; - ::dies_ok { extends() } '... extends() is not supported'; - ::dies_ok { augment() } '... augment() is not supported'; - ::dies_ok { inner() } '... inner() is not supported'; + ::dies_ok { extends() } 'extends() is not supported'; + ::dies_ok { augment() } 'augment() is not supported'; + ::dies_ok { inner() } 'inner() is not supported'; no Moose::Role; } @@ -49,25 +49,25 @@ my $foo_role = FooRole->meta; isa_ok($foo_role, 'Moose::Meta::Role'); isa_ok($foo_role, 'Class::MOP::Module'); -is($foo_role->name, 'FooRole', '... got the right name of FooRole'); -is($foo_role->version, '0.01', '... got the right version of FooRole'); +is($foo_role->name, 'FooRole', 'got the right name of FooRole'); +is($foo_role->version, '0.01', 'got the right version of FooRole'); # methods ... -ok($foo_role->has_method('foo'), '... FooRole has the foo method'); -is($foo_role->get_method('foo')->body, \&FooRole::foo, '... FooRole got the foo method'); +ok($foo_role->has_method('foo'), 'FooRole has the foo method'); +is($foo_role->get_method('foo')->body, \&FooRole::foo, 'FooRole got the foo method'); isa_ok($foo_role->get_method('foo'), 'Moose::Meta::Role::Method'); -ok($foo_role->has_method('boo'), '... FooRole has the boo method'); -is($foo_role->get_method('boo')->body, \&FooRole::boo, '... FooRole got the boo method'); +ok($foo_role->has_method('boo'), 'FooRole has the boo method'); +is($foo_role->get_method('boo')->body, \&FooRole::boo, 'FooRole got the boo method'); isa_ok($foo_role->get_method('boo'), 'Moose::Meta::Role::Method'); is_deeply( [ sort $foo_role->get_method_list() ], [ 'boo', 'foo', 'meta' ], - '... got the right method list'); + 'got the right method list'); ok(FooRole->can('foo'), "locally defined methods are still there"); ok(!FooRole->can('has'), "sugar was unimported"); @@ -77,9 +77,9 @@ ok(!FooRole->can('has'), "sugar was unimported"); is_deeply( [ sort $foo_role->get_attribute_list() ], [ 'bar', 'baz' ], - '... got the right attribute list'); + 'got the right attribute list'); -ok($foo_role->has_attribute('bar'), '... FooRole does have the bar attribute'); +ok($foo_role->has_attribute('bar'), 'FooRole does have the bar attribute'); my $bar_attr = $foo_role->get_attribute('bar'); is($bar_attr->{is}, 'rw', @@ -91,7 +91,7 @@ is(ref($bar_attr->{definition_context}), 'HASH', is($bar_attr->{definition_context}->{package}, 'FooRole', 'bar was defined in FooRole'); -ok($foo_role->has_attribute('baz'), '... FooRole does have the baz attribute'); +ok($foo_role->has_attribute('baz'), 'FooRole does have the baz attribute'); my $baz_attr = $foo_role->get_attribute('baz'); is($baz_attr->{is}, 'ro', @@ -103,53 +103,53 @@ is($baz_attr->{definition_context}->{package}, 'FooRole', # method modifiers -ok($foo_role->has_before_method_modifiers('boo'), '... now we have a boo:before modifier'); +ok($foo_role->has_before_method_modifiers('boo'), 'now we have a boo:before modifier'); is(($foo_role->get_before_method_modifiers('boo'))[0]->(), "FooRole::boo:before", - '... got the right method back'); + 'got the right method back'); is_deeply( [ $foo_role->get_method_modifier_list('before') ], [ 'boo' ], - '... got the right list of before method modifiers'); + 'got the right list of before method modifiers'); -ok($foo_role->has_after_method_modifiers('boo'), '... now we have a boo:after modifier'); +ok($foo_role->has_after_method_modifiers('boo'), 'now we have a boo:after modifier'); is(($foo_role->get_after_method_modifiers('boo'))[0]->(), "FooRole::boo:after1", - '... got the right method back'); + 'got the right method back'); is(($foo_role->get_after_method_modifiers('boo'))[1]->(), "FooRole::boo:after2", - '... got the right method back'); + 'got the right method back'); is_deeply( [ $foo_role->get_method_modifier_list('after') ], [ 'boo' ], - '... got the right list of after method modifiers'); + 'got the right list of after method modifiers'); -ok($foo_role->has_around_method_modifiers('boo'), '... now we have a boo:around modifier'); +ok($foo_role->has_around_method_modifiers('boo'), 'now we have a boo:around modifier'); is(($foo_role->get_around_method_modifiers('boo'))[0]->(), "FooRole::boo:around", - '... got the right method back'); + 'got the right method back'); is_deeply( [ $foo_role->get_method_modifier_list('around') ], [ 'boo' ], - '... got the right list of around method modifiers'); + 'got the right list of around method modifiers'); ## overrides -ok($foo_role->has_override_method_modifier('bling'), '... now we have a bling:override modifier'); +ok($foo_role->has_override_method_modifier('bling'), 'now we have a bling:override modifier'); is($foo_role->get_override_method_modifier('bling')->(), "FooRole::bling:override", - '... got the right method back'); + 'got the right method back'); -ok($foo_role->has_override_method_modifier('fling'), '... now we have a fling:override modifier'); +ok($foo_role->has_override_method_modifier('fling'), 'now we have a fling:override modifier'); is($foo_role->get_override_method_modifier('fling')->(), "FooRole::fling:override", - '... got the right method back'); + 'got the right method back'); is_deeply( [ sort $foo_role->get_method_modifier_list('override') ], [ 'bling', 'fling' ], - '... got the right list of override method modifiers'); + 'got the right list of override method modifiers'); diff --git a/t/030_roles/003_apply_role.t b/t/030_roles/003_apply_role.t index 1ccff67..037299b 100644 --- a/t/030_roles/003_apply_role.t +++ b/t/030_roles/003_apply_role.t @@ -67,59 +67,59 @@ isa_ok( $foobar_class_meta, 'Moose::Meta::Class' ); dies_ok { $foo_class_meta->does_role(); } -'... does_role requires a role name'; +'does_role requires a role name'; dies_ok { $foo_class_meta->add_role(); } -'... apply_role requires a role'; +'apply_role requires a role'; dies_ok { $foo_class_meta->add_role( bless( {} => 'Fail' ) ); } -'... apply_role requires a role'; +'apply_role requires a role'; ok( $foo_class_meta->does_role('FooRole'), - '... the FooClass->meta does_role FooRole' ); + 'the FooClass->meta does_role FooRole' ); ok( !$foo_class_meta->does_role('OtherRole'), - '... the FooClass->meta !does_role OtherRole' ); + 'the FooClass->meta !does_role OtherRole' ); ok( $foobar_class_meta->does_role('FooRole'), - '... the FooBarClass->meta does_role FooRole' ); + 'the FooBarClass->meta does_role FooRole' ); ok( $foobar_class_meta->does_role('BarRole'), - '... the FooBarClass->meta does_role BarRole' ); + 'the FooBarClass->meta does_role BarRole' ); ok( !$foobar_class_meta->does_role('OtherRole'), - '... the FooBarClass->meta !does_role OtherRole' ); + 'the FooBarClass->meta !does_role OtherRole' ); foreach my $method_name (qw(bar baz foo boo blau goo)) { ok( $foo_class_meta->has_method($method_name), - '... FooClass has the method ' . $method_name ); + 'FooClass has the method ' . $method_name ); ok( $foobar_class_meta->has_method($method_name), - '... FooBarClass has the method ' . $method_name ); + 'FooBarClass has the method ' . $method_name ); } ok( !$foo_class_meta->has_method('woot'), - '... FooClass lacks the method woot' ); + 'FooClass lacks the method woot' ); ok( $foobar_class_meta->has_method('woot'), - '... FooBarClass has the method woot' ); + 'FooBarClass has the method woot' ); foreach my $attr_name (qw(bar baz)) { ok( $foo_class_meta->has_attribute($attr_name), - '... FooClass has the attribute ' . $attr_name ); + 'FooClass has the attribute ' . $attr_name ); ok( $foobar_class_meta->has_attribute($attr_name), - '... FooBarClass has the attribute ' . $attr_name ); + 'FooBarClass has the attribute ' . $attr_name ); } can_ok( 'FooClass', 'does' ); -ok( FooClass->does('FooRole'), '... the FooClass does FooRole' ); -ok( !FooClass->does('BarRole'), '... the FooClass does not do BarRole' ); -ok( !FooClass->does('OtherRole'), '... the FooClass does not do OtherRole' ); +ok( FooClass->does('FooRole'), 'the FooClass does FooRole' ); +ok( !FooClass->does('BarRole'), 'the FooClass does not do BarRole' ); +ok( !FooClass->does('OtherRole'), 'the FooClass does not do OtherRole' ); can_ok( 'FooBarClass', 'does' ); -ok( FooBarClass->does('FooRole'), '... the FooClass does FooRole' ); -ok( FooBarClass->does('BarRole'), '... the FooBarClass does FooBarRole' ); +ok( FooBarClass->does('FooRole'), 'the FooClass does FooRole' ); +ok( FooBarClass->does('BarRole'), 'the FooBarClass does FooBarRole' ); ok( !FooBarClass->does('OtherRole'), - '... the FooBarClass does not do OtherRole' ); + 'the FooBarClass does not do OtherRole' ); my $foo = FooClass->new(); isa_ok( $foo, 'FooClass' ); @@ -127,51 +127,51 @@ isa_ok( $foo, 'FooClass' ); my $foobar = FooBarClass->new(); isa_ok( $foobar, 'FooBarClass' ); -is( $foo->goo, 'FooClass::goo', '... got the right value of goo' ); -is( $foobar->goo, 'FooRole::goo', '... got the right value of goo' ); +is( $foo->goo, 'FooClass::goo', 'got the right value of goo' ); +is( $foobar->goo, 'FooRole::goo', 'got the right value of goo' ); is( $foo->boo, 'FooRole::boo -> BarClass::boo', - '... got the right value from ->boo' ); + 'got the right value from ->boo' ); is( $foobar->boo, 'FooRole::boo -> FooRole::boo -> BarClass::boo', - '... got the right value from ->boo (double wrapped)' ); + 'got the right value from ->boo (double wrapped)' ); is( $foo->blau, 'FooRole::blau -> FooClass::blau', - '... got the right value from ->blau' ); + 'got the right value from ->blau' ); is( $foobar->blau, 'FooRole::blau -> FooRole::blau -> FooClass::blau', - '... got the right value from ->blau' ); + 'got the right value from ->blau' ); foreach my $foo ( $foo, $foobar ) { can_ok( $foo, 'does' ); - ok( $foo->does('FooRole'), '... an instance of FooClass does FooRole' ); + ok( $foo->does('FooRole'), 'an instance of FooClass does FooRole' ); ok( !$foo->does('OtherRole'), - '... and instance of FooClass does not do OtherRole' ); + 'and instance of FooClass does not do OtherRole' ); can_ok( $foobar, 'does' ); ok( $foobar->does('FooRole'), - '... an instance of FooBarClass does FooRole' ); + 'an instance of FooBarClass does FooRole' ); ok( $foobar->does('BarRole'), - '... an instance of FooBarClass does BarRole' ); + 'an instance of FooBarClass does BarRole' ); ok( !$foobar->does('OtherRole'), - '... and instance of FooBarClass does not do OtherRole' ); + 'and instance of FooBarClass does not do OtherRole' ); for my $method (qw/bar baz foo boo goo blau/) { can_ok( $foo, $method ); } - is( $foo->foo, 'FooRole::foo', '... got the right value of foo' ); + is( $foo->foo, 'FooRole::foo', 'got the right value of foo' ); - ok( !defined( $foo->baz ), '... $foo->baz is undefined' ); - ok( !defined( $foo->bar ), '... $foo->bar is undefined' ); + ok( !defined( $foo->baz ), '$foo->baz is undefined' ); + ok( !defined( $foo->bar ), '$foo->bar is undefined' ); dies_ok { $foo->baz(1); } - '... baz is a read-only accessor'; + 'baz is a read-only accessor'; dies_ok { $foo->bar(1); } - '... bar is a read-write accessor with a type constraint'; + 'bar is a read-write accessor with a type constraint'; my $foo2 = FooClass->new(); isa_ok( $foo2, 'FooClass' ); @@ -179,7 +179,7 @@ foreach my $foo ( $foo, $foobar ) { lives_ok { $foo->bar($foo2); } - '... bar is a read-write accessor with a type constraint'; + 'bar is a read-write accessor with a type constraint'; - is( $foo->bar, $foo2, '... got the right value for bar now' ); + is( $foo->bar, $foo2, 'got the right value for bar now' ); } diff --git a/t/030_roles/004_role_composition_errors.t b/t/030_roles/004_role_composition_errors.t index ce8918f..76d6ef1 100644 --- a/t/030_roles/004_role_composition_errors.t +++ b/t/030_roles/004_role_composition_errors.t @@ -19,7 +19,7 @@ use Test::Exception; is_deeply( [ sort Foo::Role->meta->get_required_method_list ], ['foo'], - '... the Foo::Role has a required method (foo)' + 'the Foo::Role has a required method (foo)' ); # classes which does not implement required method @@ -29,7 +29,7 @@ is_deeply( use Moose; ::dies_ok { with('Foo::Role') } - '... no foo method implemented by Foo::Class'; + 'no foo method implemented by Foo::Class'; } # class which does implement required method @@ -39,9 +39,9 @@ is_deeply( use Moose; ::dies_ok { with('Foo::Class') } - '... cannot consume a class, it must be a role'; + 'cannot consume a class, it must be a role'; ::lives_ok { with('Foo::Role') } - '... has a foo method implemented by Bar::Class'; + 'has a foo method implemented by Bar::Class'; sub foo {'Bar::Class::foo'} } @@ -53,7 +53,7 @@ is_deeply( use Moose::Role; ::lives_ok { with('Foo::Role') } - '... has a foo method implemented by Bar::Role'; + 'has a foo method implemented by Bar::Role'; sub foo {'Bar::Role::foo'} } @@ -61,7 +61,7 @@ is_deeply( is_deeply( [ sort Bar::Role->meta->get_required_method_list ], [], - '... the Bar::Role has not inherited the required method from Foo::Role' + 'the Bar::Role has not inherited the required method from Foo::Role' ); # role which does not implement required method @@ -71,13 +71,13 @@ is_deeply( use Moose::Role; ::lives_ok { with('Foo::Role') } - '... no foo method implemented by Baz::Role'; + 'no foo method implemented by Baz::Role'; } is_deeply( [ sort Baz::Role->meta->get_required_method_list ], ['foo'], - '... the Baz::Role has inherited the required method from Foo::Role' + 'the Baz::Role has inherited the required method from Foo::Role' ); # classes which does not implement required method @@ -87,7 +87,7 @@ is_deeply( use Moose; ::dies_ok { with('Baz::Role') } - '... no foo method implemented by Baz::Class2'; + 'no foo method implemented by Baz::Class2'; } # class which does implement required method @@ -97,7 +97,7 @@ is_deeply( use Moose; ::lives_ok { with('Baz::Role') } - '... has a foo method implemented by Baz::Class2'; + 'has a foo method implemented by Baz::Class2'; sub foo {'Baz::Class2::foo'} } diff --git a/t/030_roles/005_role_conflict_detection.t b/t/030_roles/005_role_conflict_detection.t index 7da76ad..05626c1 100644 --- a/t/030_roles/005_role_conflict_detection.t +++ b/t/030_roles/005_role_conflict_detection.t @@ -34,47 +34,47 @@ Mutually recursive roles. ::lives_ok { with 'Role::Foo', 'Role::Bar'; - } '... our mutually recursive roles combine okay'; + } 'our mutually recursive roles combine okay'; package My::Test2; use Moose; ::lives_ok { with 'Role::Bar', 'Role::Foo'; - } '... our mutually recursive roles combine okay (no matter what order)'; + } 'our mutually recursive roles combine okay (no matter what order)'; } my $test1 = My::Test1->new; isa_ok($test1, 'My::Test1'); -ok($test1->does('Role::Foo'), '... $test1 does Role::Foo'); -ok($test1->does('Role::Bar'), '... $test1 does Role::Bar'); +ok($test1->does('Role::Foo'), '$test1 does Role::Foo'); +ok($test1->does('Role::Bar'), '$test1 does Role::Bar'); can_ok($test1, 'foo'); can_ok($test1, 'bar'); -is($test1->foo, 'Role::Bar::foo', '... $test1->foo worked'); -is($test1->bar, 'Role::Foo::bar', '... $test1->bar worked'); +is($test1->foo, 'Role::Bar::foo', '$test1->foo worked'); +is($test1->bar, 'Role::Foo::bar', '$test1->bar worked'); my $test2 = My::Test2->new; isa_ok($test2, 'My::Test2'); -ok($test2->does('Role::Foo'), '... $test2 does Role::Foo'); -ok($test2->does('Role::Bar'), '... $test2 does Role::Bar'); +ok($test2->does('Role::Foo'), '$test2 does Role::Foo'); +ok($test2->does('Role::Bar'), '$test2 does Role::Bar'); can_ok($test2, 'foo'); can_ok($test2, 'bar'); -is($test2->foo, 'Role::Bar::foo', '... $test2->foo worked'); -is($test2->bar, 'Role::Foo::bar', '... $test2->bar worked'); +is($test2->foo, 'Role::Bar::foo', '$test2->foo worked'); +is($test2->bar, 'Role::Foo::bar', '$test2->bar worked'); # check some meta-stuff -ok(Role::Foo->meta->has_method('bar'), '... it still has the bar method'); -ok(Role::Foo->meta->requires_method('foo'), '... it still has the required foo method'); +ok(Role::Foo->meta->has_method('bar'), 'it still has the bar method'); +ok(Role::Foo->meta->requires_method('foo'), 'it still has the required foo method'); -ok(Role::Bar->meta->has_method('foo'), '... it still has the foo method'); -ok(Role::Bar->meta->requires_method('bar'), '... it still has the required bar method'); +ok(Role::Bar->meta->has_method('foo'), 'it still has the foo method'); +ok(Role::Bar->meta->requires_method('bar'), 'it still has the required bar method'); =pod @@ -100,7 +100,7 @@ Role method conflicts ::throws_ok { with 'Role::Bling', 'Role::Bling::Bling'; - } qr/Due to a method name conflict in roles 'Role::Bling' and 'Role::Bling::Bling', the method 'bling' must be implemented or excluded by 'My::Test3'/, '... role methods conflict and method was required'; + } qr/Due to a method name conflict in roles 'Role::Bling' and 'Role::Bling::Bling', the method 'bling' must be implemented or excluded by 'My::Test3'/, 'role methods conflict and method was required'; package My::Test4; use Moose; @@ -108,7 +108,7 @@ Role method conflicts ::lives_ok { with 'Role::Bling'; with 'Role::Bling::Bling'; - } '... role methods didnt conflict when manually combined'; + } 'role methods didnt conflict when manually combined'; package My::Test5; use Moose; @@ -116,35 +116,35 @@ Role method conflicts ::lives_ok { with 'Role::Bling::Bling'; with 'Role::Bling'; - } '... role methods didnt conflict when manually combined (in opposite order)'; + } 'role methods didnt conflict when manually combined (in opposite order)'; package My::Test6; use Moose; ::lives_ok { with 'Role::Bling::Bling', 'Role::Bling'; - } '... role methods didnt conflict when manually resolved'; + } 'role methods didnt conflict when manually resolved'; sub bling { 'My::Test6::bling' } } -ok(!My::Test3->meta->has_method('bling'), '... we didnt get any methods in the conflict'); -ok(My::Test4->meta->has_method('bling'), '... we did get the method when manually dealt with'); -ok(My::Test5->meta->has_method('bling'), '... we did get the method when manually dealt with'); -ok(My::Test6->meta->has_method('bling'), '... we did get the method when manually dealt with'); +ok(!My::Test3->meta->has_method('bling'), 'we didnt get any methods in the conflict'); +ok(My::Test4->meta->has_method('bling'), 'we did get the method when manually dealt with'); +ok(My::Test5->meta->has_method('bling'), 'we did get the method when manually dealt with'); +ok(My::Test6->meta->has_method('bling'), 'we did get the method when manually dealt with'); -ok(!My::Test3->does('Role::Bling'), '... our class does() the correct roles'); -ok(!My::Test3->does('Role::Bling::Bling'), '... our class does() the correct roles'); -ok(My::Test4->does('Role::Bling'), '... our class does() the correct roles'); -ok(My::Test4->does('Role::Bling::Bling'), '... our class does() the correct roles'); -ok(My::Test5->does('Role::Bling'), '... our class does() the correct roles'); -ok(My::Test5->does('Role::Bling::Bling'), '... our class does() the correct roles'); -ok(My::Test6->does('Role::Bling'), '... our class does() the correct roles'); -ok(My::Test6->does('Role::Bling::Bling'), '... our class does() the correct roles'); +ok(!My::Test3->does('Role::Bling'), 'our class does() the correct roles'); +ok(!My::Test3->does('Role::Bling::Bling'), 'our class does() the correct roles'); +ok(My::Test4->does('Role::Bling'), 'our class does() the correct roles'); +ok(My::Test4->does('Role::Bling::Bling'), 'our class does() the correct roles'); +ok(My::Test5->does('Role::Bling'), 'our class does() the correct roles'); +ok(My::Test5->does('Role::Bling::Bling'), 'our class does() the correct roles'); +ok(My::Test6->does('Role::Bling'), 'our class does() the correct roles'); +ok(My::Test6->does('Role::Bling::Bling'), 'our class does() the correct roles'); -is(My::Test4->bling, 'Role::Bling::bling', '... and we got the first method that was added'); -is(My::Test5->bling, 'Role::Bling::Bling::bling', '... and we got the first method that was added'); -is(My::Test6->bling, 'My::Test6::bling', '... and we got the local method'); +is(My::Test4->bling, 'Role::Bling::bling', 'and we got the first method that was added'); +is(My::Test5->bling, 'Role::Bling::Bling::bling', 'and we got the first method that was added'); +is(My::Test6->bling, 'My::Test6::bling', 'and we got the local method'); # check how this affects role compostion @@ -157,12 +157,12 @@ is(My::Test6->bling, 'My::Test6::bling', '... and we got the local method'); sub bling { 'Role::Bling::Bling::Bling::bling' } } -ok(Role::Bling::Bling->meta->has_method('bling'), '... still got the bling method in Role::Bling::Bling'); -ok(Role::Bling::Bling->meta->does_role('Role::Bling::Bling'), '... our role correctly does() the other role'); -ok(Role::Bling::Bling::Bling->meta->has_method('bling'), '... dont have the bling method in Role::Bling::Bling::Bling'); +ok(Role::Bling::Bling->meta->has_method('bling'), 'still got the bling method in Role::Bling::Bling'); +ok(Role::Bling::Bling->meta->does_role('Role::Bling::Bling'), 'our role correctly does() the other role'); +ok(Role::Bling::Bling::Bling->meta->has_method('bling'), 'dont have the bling method in Role::Bling::Bling::Bling'); is(Role::Bling::Bling::Bling->meta->get_method('bling')->(), 'Role::Bling::Bling::Bling::bling', - '... still got the bling method in Role::Bling::Bling::Bling'); + 'still got the bling method in Role::Bling::Bling::Bling'); =pod @@ -190,7 +190,7 @@ Role attribute conflicts ::throws_ok { with 'Role::Boo', 'Role::Boo::Hoo'; } qr/We have encountered an attribute conflict/, - '... role attrs conflict and method was required'; + 'role attrs conflict and method was required'; package My::Test8; use Moose; @@ -198,7 +198,7 @@ Role attribute conflicts ::lives_ok { with 'Role::Boo'; with 'Role::Boo::Hoo'; - } '... role attrs didnt conflict when manually combined'; + } 'role attrs didnt conflict when manually combined'; package My::Test9; use Moose; @@ -206,7 +206,7 @@ Role attribute conflicts ::lives_ok { with 'Role::Boo::Hoo'; with 'Role::Boo'; - } '... role attrs didnt conflict when manually combined'; + } 'role attrs didnt conflict when manually combined'; package My::Test10; use Moose; @@ -216,31 +216,31 @@ Role attribute conflicts ::throws_ok { with 'Role::Boo', 'Role::Boo::Hoo'; } qr/We have encountered an attribute conflict/, - '... role attrs conflict and cannot be manually disambiguted'; + 'role attrs conflict and cannot be manually disambiguted'; } -ok(!My::Test7->meta->has_attribute('ghost'), '... we didnt get any attributes in the conflict'); -ok(My::Test8->meta->has_attribute('ghost'), '... we did get an attributes when manually composed'); -ok(My::Test9->meta->has_attribute('ghost'), '... we did get an attributes when manually composed'); -ok(My::Test10->meta->has_attribute('ghost'), '... we did still have an attribute ghost (conflict does not mess with class)'); +ok(!My::Test7->meta->has_attribute('ghost'), 'we didnt get any attributes in the conflict'); +ok(My::Test8->meta->has_attribute('ghost'), 'we did get an attributes when manually composed'); +ok(My::Test9->meta->has_attribute('ghost'), 'we did get an attributes when manually composed'); +ok(My::Test10->meta->has_attribute('ghost'), 'we did still have an attribute ghost (conflict does not mess with class)'); -ok(!My::Test7->does('Role::Boo'), '... our class does() the correct roles'); -ok(!My::Test7->does('Role::Boo::Hoo'), '... our class does() the correct roles'); -ok(My::Test8->does('Role::Boo'), '... our class does() the correct roles'); -ok(My::Test8->does('Role::Boo::Hoo'), '... our class does() the correct roles'); -ok(My::Test9->does('Role::Boo'), '... our class does() the correct roles'); -ok(My::Test9->does('Role::Boo::Hoo'), '... our class does() the correct roles'); -ok(!My::Test10->does('Role::Boo'), '... our class does() the correct roles'); -ok(!My::Test10->does('Role::Boo::Hoo'), '... our class does() the correct roles'); +ok(!My::Test7->does('Role::Boo'), 'our class does() the correct roles'); +ok(!My::Test7->does('Role::Boo::Hoo'), 'our class does() the correct roles'); +ok(My::Test8->does('Role::Boo'), 'our class does() the correct roles'); +ok(My::Test8->does('Role::Boo::Hoo'), 'our class does() the correct roles'); +ok(My::Test9->does('Role::Boo'), 'our class does() the correct roles'); +ok(My::Test9->does('Role::Boo::Hoo'), 'our class does() the correct roles'); +ok(!My::Test10->does('Role::Boo'), 'our class does() the correct roles'); +ok(!My::Test10->does('Role::Boo::Hoo'), 'our class does() the correct roles'); can_ok('My::Test8', 'ghost'); can_ok('My::Test9', 'ghost'); can_ok('My::Test10', 'ghost'); -is(My::Test8->new->ghost, 'Role::Boo::ghost', '... got the expected default attr value'); -is(My::Test9->new->ghost, 'Role::Boo::Hoo::ghost', '... got the expected default attr value'); -is(My::Test10->new->ghost, 'My::Test10::ghost', '... got the expected default attr value'); +is(My::Test8->new->ghost, 'Role::Boo::ghost', 'got the expected default attr value'); +is(My::Test9->new->ghost, 'Role::Boo::Hoo::ghost', 'got the expected default attr value'); +is(My::Test10->new->ghost, 'My::Test10::ghost', 'got the expected default attr value'); =pod @@ -277,7 +277,7 @@ Role override method conflicts ::lives_ok { with 'Role::Truth'; - } '... composed the role with override okay'; + } 'composed the role with override okay'; package My::Test12; use Moose; @@ -286,14 +286,14 @@ Role override method conflicts ::lives_ok { with 'Role::Plot'; - } '... composed the role with override okay'; + } 'composed the role with override okay'; package My::Test13; use Moose; ::dies_ok { with 'Role::Plot'; - } '... cannot compose it because we have no superclass'; + } 'cannot compose it because we have no superclass'; package My::Test14; use Moose; @@ -303,26 +303,26 @@ Role override method conflicts ::throws_ok { with 'Role::Plot', 'Role::Truth'; } qr/Two \'override\' methods of the same name encountered/, - '... cannot compose it because we have no superclass'; + 'cannot compose it because we have no superclass'; } -ok(My::Test11->meta->has_method('twist'), '... the twist method has been added'); -ok(My::Test12->meta->has_method('twist'), '... the twist method has been added'); -ok(!My::Test13->meta->has_method('twist'), '... the twist method has not been added'); -ok(!My::Test14->meta->has_method('twist'), '... the twist method has not been added'); +ok(My::Test11->meta->has_method('twist'), 'the twist method has been added'); +ok(My::Test12->meta->has_method('twist'), 'the twist method has been added'); +ok(!My::Test13->meta->has_method('twist'), 'the twist method has not been added'); +ok(!My::Test14->meta->has_method('twist'), 'the twist method has not been added'); -ok(!My::Test11->does('Role::Plot'), '... our class does() the correct roles'); -ok(My::Test11->does('Role::Truth'), '... our class does() the correct roles'); -ok(!My::Test12->does('Role::Truth'), '... our class does() the correct roles'); -ok(My::Test12->does('Role::Plot'), '... our class does() the correct roles'); -ok(!My::Test13->does('Role::Plot'), '... our class does() the correct roles'); -ok(!My::Test14->does('Role::Truth'), '... our class does() the correct roles'); -ok(!My::Test14->does('Role::Plot'), '... our class does() the correct roles'); +ok(!My::Test11->does('Role::Plot'), 'our class does() the correct roles'); +ok(My::Test11->does('Role::Truth'), 'our class does() the correct roles'); +ok(!My::Test12->does('Role::Truth'), 'our class does() the correct roles'); +ok(My::Test12->does('Role::Plot'), 'our class does() the correct roles'); +ok(!My::Test13->does('Role::Plot'), 'our class does() the correct roles'); +ok(!My::Test14->does('Role::Truth'), 'our class does() the correct roles'); +ok(!My::Test14->does('Role::Plot'), 'our class does() the correct roles'); -is(My::Test11->twist(), 'My::Test::Base::twist -> Role::Truth::twist', '... got the right method return'); -is(My::Test12->twist(), 'My::Test::Base::twist -> Role::Plot::twist', '... got the right method return'); -ok(!My::Test13->can('twist'), '... no twist method here at all'); -is(My::Test14->twist(), 'My::Test::Base::twist', '... got the right method return (from superclass)'); +is(My::Test11->twist(), 'My::Test::Base::twist -> Role::Truth::twist', 'got the right method return'); +is(My::Test12->twist(), 'My::Test::Base::twist -> Role::Plot::twist', 'got the right method return'); +ok(!My::Test13->can('twist'), 'no twist method here at all'); +is(My::Test14->twist(), 'My::Test::Base::twist', 'got the right method return (from superclass)'); { package Role::Reality; @@ -331,18 +331,18 @@ is(My::Test14->twist(), 'My::Test::Base::twist', '... got the right method retur ::throws_ok { with 'Role::Plot'; } qr/A local method of the same name as been found/, - '... could not compose roles here, it dies'; + 'could not compose roles here, it dies'; sub twist { 'Role::Reality::twist'; } } -ok(Role::Reality->meta->has_method('twist'), '... the twist method has not been added'); -#ok(!Role::Reality->meta->does_role('Role::Plot'), '... our role does() the correct roles'); +ok(Role::Reality->meta->has_method('twist'), 'the twist method has not been added'); +#ok(!Role::Reality->meta->does_role('Role::Plot'), 'our role does() the correct roles'); is(Role::Reality->meta->get_method('twist')->(), 'Role::Reality::twist', - '... the twist method returns the right value'); + 'the twist method returns the right value'); # Ovid's test case from rt.cpan.org #44 { @@ -420,7 +420,7 @@ Now I have to decide actually what happens, and how to fix it. ::lives_ok { with 'Role::Method'; - } '... composed the method role into the method class'; + } 'composed the method role into the method class'; sub ghost { 'My::Test15::ghost' } @@ -429,7 +429,7 @@ Now I have to decide actually what happens, and how to fix it. ::lives_ok { with 'Role::Method'; - } '... composed the method role into the attribute class'; + } 'composed the method role into the attribute class'; has 'ghost' => (is => 'ro', default => 'My::Test16::ghost'); @@ -438,7 +438,7 @@ Now I have to decide actually what happens, and how to fix it. ::lives_ok { with 'Role::Attribute'; - } '... composed the attribute role into the method class'; + } 'composed the attribute role into the method class'; sub ghost { 'My::Test17::ghost' } @@ -447,7 +447,7 @@ Now I have to decide actually what happens, and how to fix it. ::lives_ok { with 'Role::Attribute'; - } '... composed the attribute role into the attribute class'; + } 'composed the attribute role into the attribute class'; has 'ghost' => (is => 'ro', default => 'My::Test18::ghost'); @@ -456,7 +456,7 @@ Now I have to decide actually what happens, and how to fix it. ::lives_ok { with 'Role::Method', 'Role::Method2'; - } '... composed method roles into class with method tiebreaker'; + } 'composed method roles into class with method tiebreaker'; sub ghost { 'My::Test19::ghost' } @@ -465,7 +465,7 @@ Now I have to decide actually what happens, and how to fix it. ::lives_ok { with 'Role::Method', 'Role::Method2'; - } '... composed method roles into class with attribute tiebreaker'; + } 'composed method roles into class with attribute tiebreaker'; has 'ghost' => (is => 'ro', default => 'My::Test20::ghost'); @@ -474,7 +474,7 @@ Now I have to decide actually what happens, and how to fix it. ::lives_ok { with 'Role::Attribute', 'Role::Attribute2'; - } '... composed attribute roles into class with method tiebreaker'; + } 'composed attribute roles into class with method tiebreaker'; sub ghost { 'My::Test21::ghost' } @@ -483,7 +483,7 @@ Now I have to decide actually what happens, and how to fix it. ::lives_ok { with 'Role::Attribute', 'Role::Attribute2'; - } '... composed attribute roles into class with attribute tiebreaker'; + } 'composed attribute roles into class with attribute tiebreaker'; has 'ghost' => (is => 'ro', default => 'My::Test22::ghost'); @@ -492,7 +492,7 @@ Now I have to decide actually what happens, and how to fix it. ::lives_ok { with 'Role::Method', 'Role::Attribute'; - } '... composed method and attribute role into class with method tiebreaker'; + } 'composed method and attribute role into class with method tiebreaker'; sub ghost { 'My::Test23::ghost' } @@ -501,7 +501,7 @@ Now I have to decide actually what happens, and how to fix it. ::lives_ok { with 'Role::Method', 'Role::Attribute'; - } '... composed method and attribute role into class with attribute tiebreaker'; + } 'composed method and attribute role into class with attribute tiebreaker'; has 'ghost' => (is => 'ro', default => 'My::Test24::ghost'); @@ -510,7 +510,7 @@ Now I have to decide actually what happens, and how to fix it. ::lives_ok { with 'Role::Attribute', 'Role::Method'; - } '... composed attribute and method role into class with method tiebreaker'; + } 'composed attribute and method role into class with method tiebreaker'; sub ghost { 'My::Test25::ghost' } @@ -519,57 +519,57 @@ Now I have to decide actually what happens, and how to fix it. ::lives_ok { with 'Role::Attribute', 'Role::Method'; - } '... composed attribute and method role into class with attribute tiebreaker'; + } 'composed attribute and method role into class with attribute tiebreaker'; has 'ghost' => (is => 'ro', default => 'My::Test26::ghost'); } my $test15 = My::Test15->new; isa_ok($test15, 'My::Test15'); -is($test15->ghost, 'My::Test15::ghost', '... we access the method from the class and ignore the role method'); +is($test15->ghost, 'My::Test15::ghost', 'we access the method from the class and ignore the role method'); my $test16 = My::Test16->new; isa_ok($test16, 'My::Test16'); -is($test16->ghost, 'My::Test16::ghost', '... we access the attribute from the class and ignore the role method'); +is($test16->ghost, 'My::Test16::ghost', 'we access the attribute from the class and ignore the role method'); my $test17 = My::Test17->new; isa_ok($test17, 'My::Test17'); -is($test17->ghost, 'My::Test17::ghost', '... we access the method from the class and ignore the role attribute'); +is($test17->ghost, 'My::Test17::ghost', 'we access the method from the class and ignore the role attribute'); my $test18 = My::Test18->new; isa_ok($test18, 'My::Test18'); -is($test18->ghost, 'My::Test18::ghost', '... we access the attribute from the class and ignore the role attribute'); +is($test18->ghost, 'My::Test18::ghost', 'we access the attribute from the class and ignore the role attribute'); my $test19 = My::Test19->new; isa_ok($test19, 'My::Test19'); -is($test19->ghost, 'My::Test19::ghost', '... we access the method from the class and ignore the role methods'); +is($test19->ghost, 'My::Test19::ghost', 'we access the method from the class and ignore the role methods'); my $test20 = My::Test20->new; isa_ok($test20, 'My::Test20'); -is($test20->ghost, 'My::Test20::ghost', '... we access the attribute from the class and ignore the role methods'); +is($test20->ghost, 'My::Test20::ghost', 'we access the attribute from the class and ignore the role methods'); my $test21 = My::Test21->new; isa_ok($test21, 'My::Test21'); -is($test21->ghost, 'My::Test21::ghost', '... we access the method from the class and ignore the role attributes'); +is($test21->ghost, 'My::Test21::ghost', 'we access the method from the class and ignore the role attributes'); my $test22 = My::Test22->new; isa_ok($test22, 'My::Test22'); -is($test22->ghost, 'My::Test22::ghost', '... we access the attribute from the class and ignore the role attributes'); +is($test22->ghost, 'My::Test22::ghost', 'we access the attribute from the class and ignore the role attributes'); my $test23 = My::Test23->new; isa_ok($test23, 'My::Test23'); -is($test23->ghost, 'My::Test23::ghost', '... we access the method from the class and ignore the role method and attribute'); +is($test23->ghost, 'My::Test23::ghost', 'we access the method from the class and ignore the role method and attribute'); my $test24 = My::Test24->new; isa_ok($test24, 'My::Test24'); -is($test24->ghost, 'My::Test24::ghost', '... we access the attribute from the class and ignore the role method and attribute'); +is($test24->ghost, 'My::Test24::ghost', 'we access the attribute from the class and ignore the role method and attribute'); my $test25 = My::Test25->new; isa_ok($test25, 'My::Test25'); -is($test25->ghost, 'My::Test25::ghost', '... we access the method from the class and ignore the role attribute and method'); +is($test25->ghost, 'My::Test25::ghost', 'we access the method from the class and ignore the role attribute and method'); my $test26 = My::Test26->new; isa_ok($test26, 'My::Test26'); -is($test26->ghost, 'My::Test26::ghost', '... we access the attribute from the class and ignore the role attribute and method'); +is($test26->ghost, 'My::Test26::ghost', 'we access the attribute from the class and ignore the role attribute and method'); =cut diff --git a/t/030_roles/006_role_exclusion.t b/t/030_roles/006_role_exclusion.t index 762cefd..3a3c5e7 100644 --- a/t/030_roles/006_role_exclusion.t +++ b/t/030_roles/006_role_exclusion.t @@ -36,11 +36,11 @@ trait InorganicMolecule extends Molecule end with 'Molecule'; } -ok(Molecule::Organic->meta->excludes_role('Molecule::Inorganic'), '... Molecule::Organic exludes Molecule::Inorganic'); +ok(Molecule::Organic->meta->excludes_role('Molecule::Inorganic'), 'Molecule::Organic exludes Molecule::Inorganic'); is_deeply( [ Molecule::Organic->meta->get_excluded_roles_list() ], [ 'Molecule::Inorganic' ], - '... Molecule::Organic exludes Molecule::Inorganic'); + 'Molecule::Organic exludes Molecule::Inorganic'); =pod @@ -55,7 +55,7 @@ the roles into the same class ::lives_ok { with 'Molecule::Organic'; - } '... adding the role (w/ excluded roles) okay'; + } 'adding the role (w/ excluded roles) okay'; package My::Test2; use Moose; @@ -63,32 +63,32 @@ the roles into the same class ::throws_ok { with 'Molecule::Organic', 'Molecule::Inorganic'; } qr/Conflict detected: Role Molecule::Organic excludes role 'Molecule::Inorganic'/, - '... adding the role w/ excluded role conflict dies okay'; + 'adding the role w/ excluded role conflict dies okay'; package My::Test3; use Moose; ::lives_ok { with 'Molecule::Organic'; - } '... adding the role (w/ excluded roles) okay'; + } 'adding the role (w/ excluded roles) okay'; ::throws_ok { with 'Molecule::Inorganic'; } qr/Conflict detected: My::Test3 excludes role 'Molecule::Inorganic'/, - '... adding the role w/ excluded role conflict dies okay'; + 'adding the role w/ excluded role conflict dies okay'; } -ok(My::Test1->does('Molecule::Organic'), '... My::Test1 does Molecule::Organic'); -ok(My::Test1->does('Molecule'), '... My::Test1 does Molecule'); -ok(My::Test1->meta->excludes_role('Molecule::Inorganic'), '... My::Test1 excludes Molecule::Organic'); +ok(My::Test1->does('Molecule::Organic'), 'My::Test1 does Molecule::Organic'); +ok(My::Test1->does('Molecule'), 'My::Test1 does Molecule'); +ok(My::Test1->meta->excludes_role('Molecule::Inorganic'), 'My::Test1 excludes Molecule::Organic'); -ok(!My::Test2->does('Molecule::Organic'), '... ! My::Test2 does Molecule::Organic'); -ok(!My::Test2->does('Molecule::Inorganic'), '... ! My::Test2 does Molecule::Inorganic'); +ok(!My::Test2->does('Molecule::Organic'), '! My::Test2 does Molecule::Organic'); +ok(!My::Test2->does('Molecule::Inorganic'), '! My::Test2 does Molecule::Inorganic'); -ok(My::Test3->does('Molecule::Organic'), '... My::Test3 does Molecule::Organic'); -ok(My::Test3->does('Molecule'), '... My::Test1 does Molecule'); -ok(My::Test3->meta->excludes_role('Molecule::Inorganic'), '... My::Test3 excludes Molecule::Organic'); -ok(!My::Test3->does('Molecule::Inorganic'), '... ! My::Test3 does Molecule::Inorganic'); +ok(My::Test3->does('Molecule::Organic'), 'My::Test3 does Molecule::Organic'); +ok(My::Test3->does('Molecule'), 'My::Test1 does Molecule'); +ok(My::Test3->meta->excludes_role('Molecule::Inorganic'), 'My::Test3 excludes Molecule::Organic'); +ok(!My::Test3->does('Molecule::Inorganic'), '! My::Test3 does Molecule::Inorganic'); =pod @@ -111,13 +111,13 @@ the roles into the a superclass ::throws_ok { with 'Molecule::Inorganic'; } qr/Conflict detected: My::Test4 excludes role \'Molecule::Inorganic\'/, - '... cannot add exculded role into class which extends Methane'; + 'cannot add exculded role into class which extends Methane'; } -ok(Methane->does('Molecule::Organic'), '... Methane does Molecule::Organic'); -ok(My::Test4->isa('Methane'), '... My::Test4 isa Methane'); -ok(My::Test4->does('Molecule::Organic'), '... My::Test4 does Molecule::Organic'); -ok(My::Test4->meta->does_role('Molecule::Organic'), '... My::Test4 meat does_role Molecule::Organic'); -ok(My::Test4->meta->excludes_role('Molecule::Inorganic'), '... My::Test4 meta excludes Molecule::Organic'); -ok(!My::Test4->does('Molecule::Inorganic'), '... My::Test4 does Molecule::Inorganic'); +ok(Methane->does('Molecule::Organic'), 'Methane does Molecule::Organic'); +ok(My::Test4->isa('Methane'), 'My::Test4 isa Methane'); +ok(My::Test4->does('Molecule::Organic'), 'My::Test4 does Molecule::Organic'); +ok(My::Test4->meta->does_role('Molecule::Organic'), 'My::Test4 meat does_role Molecule::Organic'); +ok(My::Test4->meta->excludes_role('Molecule::Inorganic'), 'My::Test4 meta excludes Molecule::Organic'); +ok(!My::Test4->does('Molecule::Inorganic'), 'My::Test4 does Molecule::Inorganic'); diff --git a/t/030_roles/007_roles_and_req_method_edge_cases.t b/t/030_roles/007_roles_and_req_method_edge_cases.t index b99348b..d801c5c 100644 --- a/t/030_roles/007_roles_and_req_method_edge_cases.t +++ b/t/030_roles/007_roles_and_req_method_edge_cases.t @@ -37,7 +37,7 @@ not remove the requirement) ::lives_ok { with 'Role::RequireFoo'; - } '... the required "foo" method will not exist yet (but we will live)'; + } 'the required "foo" method will not exist yet (but we will live)'; override 'foo' => sub { 'Role::ProvideFoo::foo' }; } @@ -45,7 +45,7 @@ not remove the requirement) is_deeply( [ Role::ProvideFoo->meta->get_required_method_list ], [ 'foo' ], - '... foo method is still required for Role::ProvideFoo'); + 'foo method is still required for Role::ProvideFoo'); =pod @@ -69,7 +69,7 @@ second class citizens. ::lives_ok { with 'Role::RequireFoo'; - } '... the required "foo" method will be found in the superclass'; + } 'the required "foo" method will be found in the superclass'; override 'foo' => sub { 'Class::ProvideFoo::foo' }; @@ -82,7 +82,7 @@ second class citizens. ::lives_ok { with 'Role::RequireFoo'; - } '... the required "foo" method exists, although it is overriden locally'; + } 'the required "foo" method exists, although it is overriden locally'; } @@ -101,7 +101,7 @@ method modifier. ::lives_ok { with 'Role::RequireFoo'; - } '... the required "foo" method will be found in the superclass'; + } 'the required "foo" method will be found in the superclass'; before 'foo' => sub { 'Class::ProvideFoo::foo:before' }; @@ -114,7 +114,7 @@ method modifier. ::lives_ok { with 'Role::RequireFoo'; - } '... the required "foo" method exists, although it is a before modifier locally'; + } 'the required "foo" method exists, although it is a before modifier locally'; package Class::ProvideFoo::Before3; use Moose; @@ -126,7 +126,7 @@ method modifier. ::lives_ok { with 'Role::RequireFoo'; - } '... the required "foo" method exists locally, and it is modified locally'; + } 'the required "foo" method exists locally, and it is modified locally'; package Class::ProvideFoo::Before4; use Moose; @@ -138,11 +138,11 @@ method modifier. ::isa_ok(__PACKAGE__->meta->get_method('foo'), 'Class::MOP::Method::Wrapped'); ::is(__PACKAGE__->meta->get_method('foo')->get_original_method->package_name, __PACKAGE__, - '... but the original method is from our package'); + 'but the original method is from our package'); ::lives_ok { with 'Role::RequireFoo'; - } '... the required "foo" method exists in the symbol table (and we will live)'; + } 'the required "foo" method exists in the symbol table (and we will live)'; } @@ -162,7 +162,7 @@ method modifier. ::lives_ok { with 'Role::RequireFoo'; - } '... the required "foo" method will be found in the superclass (but then overriden)'; + } 'the required "foo" method will be found in the superclass (but then overriden)'; has 'foo' => (is => 'ro'); @@ -175,7 +175,7 @@ method modifier. ::lives_ok { with 'Role::RequireFoo'; - } '... the required "foo" method exists, and is an accessor'; + } 'the required "foo" method exists, and is an accessor'; } # ... @@ -213,7 +213,7 @@ method modifier. ::lives_ok { with 'Foo::Role'; - } '... our role combined successfully'; + } 'our role combined successfully'; } # a method required in a role and implemented in a superclass, with a method diff --git a/t/030_roles/008_role_conflict_edge_cases.t b/t/030_roles/008_role_conflict_edge_cases.t index 22cc706..66907bd 100644 --- a/t/030_roles/008_role_conflict_edge_cases.t +++ b/t/030_roles/008_role_conflict_edge_cases.t @@ -35,15 +35,15 @@ a conflict) ::lives_ok { with 'Role::Derived1', 'Role::Derived2'; - } '... roles composed okay (no conflicts)'; + } 'roles composed okay (no conflicts)'; } -ok(Role::Base->meta->has_method('foo'), '... have the method foo as expected'); -ok(Role::Derived1->meta->has_method('foo'), '... have the method foo as expected'); -ok(Role::Derived2->meta->has_method('foo'), '... have the method foo as expected'); -ok(My::Test::Class1->meta->has_method('foo'), '... have the method foo as expected'); +ok(Role::Base->meta->has_method('foo'), 'have the method foo as expected'); +ok(Role::Derived1->meta->has_method('foo'), 'have the method foo as expected'); +ok(Role::Derived2->meta->has_method('foo'), 'have the method foo as expected'); +ok(My::Test::Class1->meta->has_method('foo'), 'have the method foo as expected'); -is(My::Test::Class1->foo, 'Role::Base::foo', '... got the right value from method'); +is(My::Test::Class1->foo, 'Role::Base::foo', 'got the right value from method'); =pod @@ -81,19 +81,19 @@ a method conflict with method modifiers ::lives_ok { with 'Role::Derived3', 'Role::Derived4'; - } '... roles composed okay (no conflicts)'; + } 'roles composed okay (no conflicts)'; } -ok(Role::Base2->meta->has_override_method_modifier('foo'), '... have the method foo as expected'); -ok(Role::Derived3->meta->has_override_method_modifier('foo'), '... have the method foo as expected'); -ok(Role::Derived4->meta->has_override_method_modifier('foo'), '... have the method foo as expected'); -ok(My::Test::Class2->meta->has_method('foo'), '... have the method foo as expected'); +ok(Role::Base2->meta->has_override_method_modifier('foo'), 'have the method foo as expected'); +ok(Role::Derived3->meta->has_override_method_modifier('foo'), 'have the method foo as expected'); +ok(Role::Derived4->meta->has_override_method_modifier('foo'), 'have the method foo as expected'); +ok(My::Test::Class2->meta->has_method('foo'), 'have the method foo as expected'); isa_ok(My::Test::Class2->meta->get_method('foo'), 'Moose::Meta::Method::Overridden'); -ok(My::Test::Class2::Base->meta->has_method('foo'), '... have the method foo as expected'); +ok(My::Test::Class2::Base->meta->has_method('foo'), 'have the method foo as expected'); isa_ok(My::Test::Class2::Base->meta->get_method('foo'), 'Class::MOP::Method'); -is(My::Test::Class2::Base->foo, 'My::Test::Class2::Base', '... got the right value from method'); -is(My::Test::Class2->foo, 'My::Test::Class2::Base -> Role::Base::foo', '... got the right value from method'); +is(My::Test::Class2::Base->foo, 'My::Test::Class2::Base', 'got the right value from method'); +is(My::Test::Class2->foo, 'My::Test::Class2::Base -> Role::Base::foo', 'got the right value from method'); =pod @@ -134,19 +134,19 @@ same for before/afters as well ::lives_ok { with 'Role::Derived5', 'Role::Derived6'; - } '... roles composed okay (no conflicts)'; + } 'roles composed okay (no conflicts)'; } -ok(Role::Base3->meta->has_around_method_modifiers('foo'), '... have the method foo as expected'); -ok(Role::Derived5->meta->has_around_method_modifiers('foo'), '... have the method foo as expected'); -ok(Role::Derived6->meta->has_around_method_modifiers('foo'), '... have the method foo as expected'); -ok(My::Test::Class3->meta->has_method('foo'), '... have the method foo as expected'); +ok(Role::Base3->meta->has_around_method_modifiers('foo'), 'have the method foo as expected'); +ok(Role::Derived5->meta->has_around_method_modifiers('foo'), 'have the method foo as expected'); +ok(Role::Derived6->meta->has_around_method_modifiers('foo'), 'have the method foo as expected'); +ok(My::Test::Class3->meta->has_method('foo'), 'have the method foo as expected'); isa_ok(My::Test::Class3->meta->get_method('foo'), 'Class::MOP::Method::Wrapped'); -ok(My::Test::Class3::Base->meta->has_method('foo'), '... have the method foo as expected'); +ok(My::Test::Class3::Base->meta->has_method('foo'), 'have the method foo as expected'); isa_ok(My::Test::Class3::Base->meta->get_method('foo'), 'Class::MOP::Method'); -is(My::Test::Class3::Base->foo, 'My::Test::Class3::Base', '... got the right value from method'); -is(My::Test::Class3->foo, 'Role::Base::foo(My::Test::Class3::Base)', '... got the right value from method'); +is(My::Test::Class3::Base->foo, 'My::Test::Class3::Base', 'got the right value from method'); +is(My::Test::Class3->foo, 'Role::Base::foo(My::Test::Class3::Base)', 'got the right value from method'); =pod @@ -177,12 +177,12 @@ a conflict) ::lives_ok { with 'Role::Derived7', 'Role::Derived8'; - } '... roles composed okay (no conflicts)'; + } 'roles composed okay (no conflicts)'; } -ok(Role::Base4->meta->has_attribute('foo'), '... have the attribute foo as expected'); -ok(Role::Derived7->meta->has_attribute('foo'), '... have the attribute foo as expected'); -ok(Role::Derived8->meta->has_attribute('foo'), '... have the attribute foo as expected'); -ok(My::Test::Class4->meta->has_attribute('foo'), '... have the attribute foo as expected'); +ok(Role::Base4->meta->has_attribute('foo'), 'have the attribute foo as expected'); +ok(Role::Derived7->meta->has_attribute('foo'), 'have the attribute foo as expected'); +ok(Role::Derived8->meta->has_attribute('foo'), 'have the attribute foo as expected'); +ok(My::Test::Class4->meta->has_attribute('foo'), 'have the attribute foo as expected'); -is(My::Test::Class4->new->foo, 'Role::Base::foo', '... got the right value from method'); +is(My::Test::Class4->new->foo, 'Role::Base::foo', 'got the right value from method'); diff --git a/t/030_roles/009_more_role_edge_cases.t b/t/030_roles/009_more_role_edge_cases.t index e9923f0..d8fb5f2 100644 --- a/t/030_roles/009_more_role_edge_cases.t +++ b/t/030_roles/009_more_role_edge_cases.t @@ -33,7 +33,7 @@ use Test::Exception; ::lives_ok { with "SubAA", "RootA"; - } '... role was composed as expected'; + } 'role was composed as expected'; } ok( SubAB->does("SubAA"), "does SubAA"); @@ -48,7 +48,7 @@ use Test::Exception; my $foo_rv; lives_ok { $foo_rv = $i->foo; - } '... called foo successfully'; + } 'called foo successfully'; is($foo_rv, "RootA::foo", "... got the right foo rv"); } @@ -97,7 +97,7 @@ use Test::Exception; ::lives_ok { with "SubBA"; - } '... composed the role successfully'; + } 'composed the role successfully'; } ok( SubBB->does("SubBA"), "BB does SubBA" ); @@ -110,19 +110,19 @@ use Test::Exception; my $foo_rv; lives_ok { $foo_rv = $i->foo - } '... called foo successfully'; + } 'called foo successfully'; is( $foo_rv, "RootB::foo", "foo rv" ); is( $i->counter, 1, "after hook called" ); - lives_ok { $i->foo } '... called foo successfully (again)'; + lives_ok { $i->foo } 'called foo successfully (again)'; is( $i->counter, 2, "after hook called (again)" ); - ok(SubBA->meta->has_method('foo'), '... this has the foo method'); + ok(SubBA->meta->has_method('foo'), 'this has the foo method'); #my $subba_foo_rv; #lives_ok { # $subba_foo_rv = SubBA::foo(); - #} '... called the sub as a function correctly'; - #is($subba_foo_rv, 'RootB::foo', '... the SubBA->foo is still the RootB version'); + #} 'called the sub as a function correctly'; + #is($subba_foo_rv, 'RootB::foo', 'the SubBA->foo is still the RootB version'); } { @@ -146,7 +146,7 @@ use Test::Exception; ::dies_ok { override foo => sub { "overridden" }; - } '... cannot compose an override over a local method'; + } 'cannot compose an override over a local method'; } } diff --git a/t/030_roles/010_run_time_role_composition.t b/t/030_roles/010_run_time_role_composition.t index 08354c5..a76255a 100644 --- a/t/030_roles/010_run_time_role_composition.t +++ b/t/030_roles/010_run_time_role_composition.t @@ -45,60 +45,60 @@ isa_ok($obj2, 'My::Class'); { ok(!$obj->can( 'talk' ), "... the role is not composed yet"); - ok(!$obj->does('Bark'), '... we do not do any roles yet'); + ok(!$obj->does('Bark'), 'we do not do any roles yet'); Bark->meta->apply($obj); - ok($obj->does('Bark'), '... we now do the Bark role'); - ok(!My::Class->does('Bark'), '... the class does not do the Bark role'); + ok($obj->does('Bark'), 'we now do the Bark role'); + ok(!My::Class->does('Bark'), 'the class does not do the Bark role'); isa_ok($obj, 'My::Class'); - isnt(blessed($obj), 'My::Class', '... but it is no longer blessed into My::Class'); + isnt(blessed($obj), 'My::Class', 'but it is no longer blessed into My::Class'); ok(!My::Class->can('talk'), "... the role is not composed at the class level"); ok($obj->can('talk'), "... the role is now composed at the object level"); - is($obj->talk, 'woof', '... got the right return value for the newly composed method'); + is($obj->talk, 'woof', 'got the right return value for the newly composed method'); } { - ok(!$obj2->does('Bark'), '... we do not do any roles yet'); + ok(!$obj2->does('Bark'), 'we do not do any roles yet'); Bark->meta->apply($obj2); - ok($obj2->does('Bark'), '... we now do the Bark role'); - is(blessed($obj), blessed($obj2), '... they share the same anon-class/role thing'); + ok($obj2->does('Bark'), 'we now do the Bark role'); + is(blessed($obj), blessed($obj2), 'they share the same anon-class/role thing'); } { - is($obj->sleep, 'nite-nite', '... the original method responds as expected'); + is($obj->sleep, 'nite-nite', 'the original method responds as expected'); - ok(!$obj->does('Sleeper'), '... we do not do the Sleeper role'); + ok(!$obj->does('Sleeper'), 'we do not do the Sleeper role'); Sleeper->meta->apply($obj); - ok($obj->does('Bark'), '... we still do the Bark role'); - ok($obj->does('Sleeper'), '... we now do the Sleeper role too'); + ok($obj->does('Bark'), 'we still do the Bark role'); + ok($obj->does('Sleeper'), 'we now do the Sleeper role too'); - ok(!My::Class->does('Sleeper'), '... the class does not do the Sleeper role'); + ok(!My::Class->does('Sleeper'), 'the class does not do the Sleeper role'); - isnt(blessed($obj), blessed($obj2), '... they no longer share the same anon-class/role thing'); + isnt(blessed($obj), blessed($obj2), 'they no longer share the same anon-class/role thing'); isa_ok($obj, 'My::Class'); - is(My::Class->sleep, 'nite-nite', '... the original method still responds as expected'); + is(My::Class->sleep, 'nite-nite', 'the original method still responds as expected'); - is($obj->sleep, 'snore', '... got the right return value for the newly composed method'); - is($obj->talk, 'zzz', '... got the right return value for the newly composed method'); + is($obj->sleep, 'snore', 'got the right return value for the newly composed method'); + is($obj->talk, 'zzz', 'got the right return value for the newly composed method'); } { - ok(!$obj2->does('Sleeper'), '... we do not do any roles yet'); + ok(!$obj2->does('Sleeper'), 'we do not do any roles yet'); Sleeper->meta->apply($obj2); - ok($obj2->does('Sleeper'), '... we now do the Bark role'); - is(blessed($obj), blessed($obj2), '... they share the same anon-class/role thing again'); + ok($obj2->does('Sleeper'), 'we now do the Bark role'); + is(blessed($obj), blessed($obj2), 'they share the same anon-class/role thing again'); } diff --git a/t/030_roles/011_overriding.t b/t/030_roles/011_overriding.t index 32bd113..ba5391f 100644 --- a/t/030_roles/011_overriding.t +++ b/t/030_roles/011_overriding.t @@ -64,19 +64,19 @@ is( Class::A->new->xxy, "Role::B::xxy", "... got the right xxy method" ); ::throws_ok { with 'Role::A::Conflict'; - } qr/Due to a method name conflict in roles 'Role::A' and 'Role::A::Conflict', the method 'bar' must be implemented or excluded by 'Class::A::Conflict'/, '... did not fufill the requirement of &bar method'; + } qr/Due to a method name conflict in roles 'Role::A' and 'Role::A::Conflict', the method 'bar' must be implemented or excluded by 'Class::A::Conflict'/, 'did not fufill the requirement of &bar method'; package Class::A::Resolved; use Moose; ::lives_ok { with 'Role::A::Conflict'; - } '... did fufill the requirement of &bar method'; + } 'did fufill the requirement of &bar method'; sub bar { 'Class::A::Resolved::bar' } } -ok(Role::A::Conflict->meta->requires_method('bar'), '... Role::A::Conflict created the bar requirement'); +ok(Role::A::Conflict->meta->requires_method('bar'), 'Role::A::Conflict created the bar requirement'); can_ok( Class::A::Resolved->new, qw(bar) ); @@ -125,7 +125,7 @@ is( Class::B->new->zot, "Class::B::zot", "... got the &zot method okay" ); is( Class::B->new->bar, "Role::D::bar", "... got the &bar method okay" ); is( Class::B->new->xxy, "Role::E::xxy", "... got the &xxy method okay" ); -ok(!Role::F->meta->requires_method('foo'), '... Role::F fufilled the &foo requirement'); +ok(!Role::F->meta->requires_method('foo'), 'Role::F fufilled the &foo requirement'); { # check that a conflict can be resolved @@ -147,9 +147,9 @@ ok(!Role::F->meta->requires_method('foo'), '... Role::F fufilled the &foo requir } -ok(!Role::D::And::E::Conflict->meta->requires_method('foo'), '... Role::D::And::E::Conflict fufilled the &foo requirement'); -ok(Role::D::And::E::Conflict->meta->requires_method('xxy'), '... Role::D::And::E::Conflict adds the &xxy requirement'); -ok(Role::D::And::E::Conflict->meta->requires_method('bar'), '... Role::D::And::E::Conflict adds the &bar requirement'); +ok(!Role::D::And::E::Conflict->meta->requires_method('foo'), 'Role::D::And::E::Conflict fufilled the &foo requirement'); +ok(Role::D::And::E::Conflict->meta->requires_method('xxy'), 'Role::D::And::E::Conflict adds the &xxy requirement'); +ok(Role::D::And::E::Conflict->meta->requires_method('bar'), 'Role::D::And::E::Conflict adds the &bar requirement'); { # conflict propagation @@ -203,7 +203,7 @@ is( Class::E->new->zot, "Class::E::zot", "... got the right &zot method" ); is( Class::E->new->bar, "Role::H::bar", "... got the right &bar method" ); is( Class::E->new->xxy, "Role::J::xxy", "... got the right &xxy method" ); -ok(Role::I->meta->requires_method('foo'), '... Role::I still have the &foo requirement'); +ok(Role::I->meta->requires_method('foo'), 'Role::I still have the &foo requirement'); { lives_ok { diff --git a/t/030_roles/012_method_exclusion_in_composition.t b/t/030_roles/012_method_exclusion_in_composition.t index 8c3456e..526d0aa 100644 --- a/t/030_roles/012_method_exclusion_in_composition.t +++ b/t/030_roles/012_method_exclusion_in_composition.t @@ -23,7 +23,7 @@ use Test::Exception; } ok(My::Class->meta->has_method($_), "we have a $_ method") for qw(foo baz); -ok(!My::Class->meta->has_method('bar'), '... but we excluded bar'); +ok(!My::Class->meta->has_method('bar'), 'but we excluded bar'); { package My::OtherRole; @@ -37,8 +37,8 @@ ok(!My::Class->meta->has_method('bar'), '... but we excluded bar'); ok(My::OtherRole->meta->has_method($_), "we have a $_ method") for qw(foo bar baz); -ok(!My::OtherRole->meta->requires_method('foo'), '... and the &foo method is not required'); -ok(My::OtherRole->meta->requires_method('bar'), '... and the &bar method is required'); +ok(!My::OtherRole->meta->requires_method('foo'), 'and the &foo method is not required'); +ok(My::OtherRole->meta->requires_method('bar'), 'and the &bar method is required'); { package Foo::Role; @@ -63,7 +63,7 @@ ok(My::OtherRole->meta->requires_method('bar'), '... and the &bar method is requ with 'Foo::Role' => { -excludes => 'foo' }, 'Bar::Role' => { -excludes => 'foo' }, 'Baz::Role'; - } '... composed our roles correctly'; + } 'composed our roles correctly'; package My::Foo::Class::Broken; use Moose; @@ -73,14 +73,14 @@ ok(My::OtherRole->meta->requires_method('bar'), '... and the &bar method is requ 'Bar::Role' => { -excludes => 'foo' }, 'Baz::Role'; } qr/Due to a method name conflict in roles 'Baz::Role' and 'Foo::Role', the method 'foo' must be implemented or excluded by 'My::Foo::Class::Broken'/, - '... composed our roles correctly'; + 'composed our roles correctly'; } { my $foo = My::Foo::Class->new; isa_ok($foo, 'My::Foo::Class'); can_ok($foo, 'foo'); - is($foo->foo, 'Baz::Role::foo', '... got the right method'); + is($foo->foo, 'Baz::Role::foo', 'got the right method'); } { @@ -91,11 +91,11 @@ ok(My::OtherRole->meta->requires_method('bar'), '... and the &bar method is requ with 'Foo::Role' => { -excludes => 'foo' }, 'Bar::Role' => { -excludes => 'foo' }, 'Baz::Role'; - } '... composed our roles correctly'; + } 'composed our roles correctly'; } ok(My::Foo::Role->meta->has_method('foo'), "we have a foo method"); -ok(!My::Foo::Role->meta->requires_method('foo'), '... and the &foo method is not required'); +ok(!My::Foo::Role->meta->requires_method('foo'), 'and the &foo method is not required'); { package My::Foo::Role::Other; @@ -105,11 +105,11 @@ ok(!My::Foo::Role->meta->requires_method('foo'), '... and the &foo method is not with 'Foo::Role', 'Bar::Role' => { -excludes => 'foo' }, 'Baz::Role'; - } '... composed our roles correctly'; + } 'composed our roles correctly'; } ok(!My::Foo::Role::Other->meta->has_method('foo'), "we dont have a foo method"); -ok(My::Foo::Role::Other->meta->requires_method('foo'), '... and the &foo method is required'); +ok(My::Foo::Role::Other->meta->requires_method('foo'), 'and the &foo method is required'); diff --git a/t/030_roles/013_method_aliasing_in_composition.t b/t/030_roles/013_method_aliasing_in_composition.t index 3f518ee..34b2210 100644 --- a/t/030_roles/013_method_aliasing_in_composition.t +++ b/t/030_roles/013_method_aliasing_in_composition.t @@ -23,14 +23,14 @@ use Test::Exception; ::lives_ok { with 'My::Role' => { -alias => { bar => 'role_bar' } }; - } '... this succeeds'; + } 'this succeeds'; package My::Class::Failure; use Moose; ::throws_ok { with 'My::Role' => { -alias => { bar => 'role_bar' } }; - } qr/Cannot create a method alias if a local method of the same name exists/, '... this succeeds'; + } qr/Cannot create a method alias if a local method of the same name exists/, 'this succeeds'; sub role_bar { 'FAIL' } } @@ -43,7 +43,7 @@ ok(My::Class->meta->has_method($_), "we have a $_ method") for qw(foo baz bar ro ::lives_ok { with 'My::Role' => { -alias => { bar => 'role_bar' } }; - } '... this succeeds'; + } 'this succeeds'; sub bar { 'My::OtherRole::bar' } @@ -52,14 +52,14 @@ ok(My::Class->meta->has_method($_), "we have a $_ method") for qw(foo baz bar ro ::throws_ok { with 'My::Role' => { -alias => { bar => 'role_bar' } }; - } qr/Cannot create a method alias if a local method of the same name exists/, '... cannot alias to a name that exists'; + } qr/Cannot create a method alias if a local method of the same name exists/, 'cannot alias to a name that exists'; sub role_bar { 'FAIL' } } ok(My::OtherRole->meta->has_method($_), "we have a $_ method") for qw(foo baz role_bar); -ok(My::OtherRole->meta->requires_method('bar'), '... and the &bar method is required'); -ok(!My::OtherRole->meta->requires_method('role_bar'), '... and the &role_bar method is not required'); +ok(My::OtherRole->meta->requires_method('bar'), 'and the &bar method is required'); +ok(!My::OtherRole->meta->requires_method('role_bar'), 'and the &role_bar method is not required'); { package My::AliasingRole; @@ -67,11 +67,11 @@ ok(!My::OtherRole->meta->requires_method('role_bar'), '... and the &role_bar met ::lives_ok { with 'My::Role' => { -alias => { bar => 'role_bar' } }; - } '... this succeeds'; + } 'this succeeds'; } ok(My::AliasingRole->meta->has_method($_), "we have a $_ method") for qw(foo baz role_bar); -ok(!My::AliasingRole->meta->requires_method('bar'), '... and the &bar method is not required'); +ok(!My::AliasingRole->meta->requires_method('bar'), 'and the &bar method is not required'); { package Foo::Role; @@ -96,7 +96,7 @@ ok(!My::AliasingRole->meta->requires_method('bar'), '... and the &bar method is with 'Foo::Role' => { -alias => { 'foo' => 'foo_foo' }, -excludes => 'foo' }, 'Bar::Role' => { -alias => { 'foo' => 'bar_foo' }, -excludes => 'foo' }, 'Baz::Role'; - } '... composed our roles correctly'; + } 'composed our roles correctly'; package My::Foo::Class::Broken; use Moose; @@ -106,16 +106,16 @@ ok(!My::AliasingRole->meta->requires_method('bar'), '... and the &bar method is 'Bar::Role' => { -alias => { 'foo' => 'foo_foo' }, -excludes => 'foo' }, 'Baz::Role'; } qr/Due to a method name conflict in roles 'Bar::Role' and 'Foo::Role', the method 'foo_foo' must be implemented or excluded by 'My::Foo::Class::Broken'/, - '... composed our roles correctly'; + 'composed our roles correctly'; } { my $foo = My::Foo::Class->new; isa_ok($foo, 'My::Foo::Class'); can_ok($foo, $_) for qw/foo foo_foo bar_foo/; - is($foo->foo, 'Baz::Role::foo', '... got the right method'); - is($foo->foo_foo, 'Foo::Role::foo', '... got the right method'); - is($foo->bar_foo, 'Bar::Role::foo', '... got the right method'); + is($foo->foo, 'Baz::Role::foo', 'got the right method'); + is($foo->foo_foo, 'Foo::Role::foo', 'got the right method'); + is($foo->bar_foo, 'Bar::Role::foo', 'got the right method'); } { @@ -126,11 +126,11 @@ ok(!My::AliasingRole->meta->requires_method('bar'), '... and the &bar method is with 'Foo::Role' => { -alias => { 'foo' => 'foo_foo' }, -excludes => 'foo' }, 'Bar::Role' => { -alias => { 'foo' => 'bar_foo' }, -excludes => 'foo' }, 'Baz::Role'; - } '... composed our roles correctly'; + } 'composed our roles correctly'; } ok(My::Foo::Role->meta->has_method($_), "we have a $_ method") for qw/foo foo_foo bar_foo/;; -ok(!My::Foo::Role->meta->requires_method('foo'), '... and the &foo method is not required'); +ok(!My::Foo::Role->meta->requires_method('foo'), 'and the &foo method is not required'); { @@ -141,11 +141,11 @@ ok(!My::Foo::Role->meta->requires_method('foo'), '... and the &foo method is not with 'Foo::Role' => { -alias => { 'foo' => 'foo_foo' }, -excludes => 'foo' }, 'Bar::Role' => { -alias => { 'foo' => 'foo_foo' }, -excludes => 'foo' }, 'Baz::Role'; - } '... composed our roles correctly'; + } 'composed our roles correctly'; } ok(!My::Foo::Role::Other->meta->has_method('foo_foo'), "we dont have a foo_foo method"); -ok(My::Foo::Role::Other->meta->requires_method('foo_foo'), '... and the &foo method is required'); +ok(My::Foo::Role::Other->meta->requires_method('foo_foo'), 'and the &foo method is required'); { package My::Foo::AliasOnly; @@ -153,7 +153,7 @@ ok(My::Foo::Role::Other->meta->requires_method('foo_foo'), '... and the &foo met ::lives_ok { with 'Foo::Role' => { -alias => { 'foo' => 'foo_foo' } }, - } '... composed our roles correctly'; + } 'composed our roles correctly'; } ok(My::Foo::AliasOnly->meta->has_method('foo'), 'we have a foo method'); diff --git a/t/030_roles/014_more_alias_and_exclude.t b/t/030_roles/014_more_alias_and_exclude.t index 60b3731..5ce8b0c 100644 --- a/t/030_roles/014_more_alias_and_exclude.t +++ b/t/030_roles/014_more_alias_and_exclude.t @@ -51,20 +51,20 @@ use Test::Exception; 'Bar' => { -excludes => [qw/foo baz gorch/] }, 'Baz' => { -excludes => [qw/foo bar gorch/], -alias => { foo => 'baz_foo', bar => 'baz_bar' } }, 'Gorch' => { -excludes => [qw/foo bar baz/] }; - } '... everything works out all right'; + } 'everything works out all right'; } my $c = My::Class->new; isa_ok($c, 'My::Class'); -is($c->foo, 'Foo::foo', '... got the right method'); -is($c->bar, 'Bar::bar', '... got the right method'); -is($c->baz, 'Baz::baz', '... got the right method'); -is($c->gorch, 'Gorch::gorch', '... got the right method'); +is($c->foo, 'Foo::foo', 'got the right method'); +is($c->bar, 'Bar::bar', 'got the right method'); +is($c->baz, 'Baz::baz', 'got the right method'); +is($c->gorch, 'Gorch::gorch', 'got the right method'); -is($c->foo_gorch, 'Foo::gorch', '... got the right method'); -is($c->baz_foo, 'Baz::foo', '... got the right method'); -is($c->baz_bar, 'Baz::bar', '... got the right method'); +is($c->foo_gorch, 'Foo::gorch', 'got the right method'); +is($c->baz_foo, 'Baz::foo', 'got the right method'); +is($c->baz_bar, 'Baz::bar', 'got the right method'); diff --git a/t/030_roles/015_runtime_roles_and_attrs.t b/t/030_roles/015_runtime_roles_and_attrs.t index 55a3847..153db8a 100644 --- a/t/030_roles/015_runtime_roles_and_attrs.t +++ b/t/030_roles/015_runtime_roles_and_attrs.t @@ -36,22 +36,22 @@ isa_ok($obj, 'Foo'); ok(!$obj->can( 'talk' ), "... the role is not composed yet"); ok(!$obj->can( 'fur' ), 'ditto'); -ok(!$obj->does('Dog'), '... we do not do any roles yet'); +ok(!$obj->does('Dog'), 'we do not do any roles yet'); dies_ok { $obj->dog($obj) -} '... and setting the accessor fails (not a Dog yet)'; +} 'and setting the accessor fails (not a Dog yet)'; Dog->meta->apply($obj); -ok($obj->does('Dog'), '... we now do the Bark role'); +ok($obj->does('Dog'), 'we now do the Bark role'); ok($obj->can('talk'), "... the role is now composed at the object level"); ok($obj->can('fur'), "it has fur"); -is($obj->talk, 'woof', '... got the right return value for the newly composed method'); +is($obj->talk, 'woof', 'got the right return value for the newly composed method'); lives_ok { $obj->dog($obj) -} '... and setting the accessor is okay'; +} 'and setting the accessor is okay'; is($obj->fur, "dirty", "role attr initialized"); diff --git a/t/030_roles/016_runtime_roles_and_nonmoose.t b/t/030_roles/016_runtime_roles_and_nonmoose.t index be31150..3f1f49f 100644 --- a/t/030_roles/016_runtime_roles_and_nonmoose.t +++ b/t/030_roles/016_runtime_roles_and_nonmoose.t @@ -43,15 +43,15 @@ ok(!$bar->can( 'talk' ), "... the role is not composed yet"); dies_ok { $foo->dog($bar) -} '... and setting the accessor fails (not a Dog yet)'; +} 'and setting the accessor fails (not a Dog yet)'; Dog->meta->apply($bar); ok($bar->can('talk'), "... the role is now composed at the object level"); -is($bar->talk, 'woof', '... got the right return value for the newly composed method'); +is($bar->talk, 'woof', 'got the right return value for the newly composed method'); lives_ok { $foo->dog($bar) -} '... and setting the accessor is okay'; +} 'and setting the accessor is okay'; diff --git a/t/030_roles/017_extending_role_attrs.t b/t/030_roles/017_extending_role_attrs.t index e960a67..720dd0f 100644 --- a/t/030_roles/017_extending_role_attrs.t +++ b/t/030_roles/017_extending_role_attrs.t @@ -32,13 +32,13 @@ on role attributes works right. ::lives_ok { has '+bar' => (default => sub { 100 }); - } '... extended the attribute successfully'; + } 'extended the attribute successfully'; } my $foo = Foo->new; isa_ok($foo, 'Foo'); -is($foo->bar, 100, '... got the extended attribute'); +is($foo->bar, 100, 'got the extended attribute'); { @@ -64,7 +64,7 @@ is($foo->bar, 100, '... got the extended attribute'); my $bar = Bar->new(foo => 42); isa_ok($bar, 'Bar'); -is($bar->foo, 42, '... got the extended attribute'); +is($bar->foo, 42, 'got the extended attribute'); $bar->foo(100); is($bar->foo, 100, "... can change the attribute's value to an Int"); @@ -95,7 +95,7 @@ is($bar->foo, 100, "... still has the old Int value"); my $baz = Baz->new(baz => 99); isa_ok($baz, 'Baz'); -is($baz->baz, 99, '... got the extended attribute'); +is($baz->baz, 99, 'got the extended attribute'); $baz->baz('Foo'); is($baz->baz, 'Foo', "... can change the attribute's value to a ClassName"); @@ -131,7 +131,7 @@ is_deeply($baz->baz, 'Foo', "... still has the old ClassName value"); my $quux = Quux->new(quux => 99); isa_ok($quux, 'Quux'); -is($quux->quux, 99, '... got the extended attribute'); +is($quux->quux, 99, 'got the extended attribute'); $quux->quux(100); is($quux->quux, 100, "... can change the attribute's value to an Int"); $quux->quux(["hi"]); diff --git a/t/030_roles/018_runtime_roles_w_params.t b/t/030_roles/018_runtime_roles_w_params.t index 33de3c3..8222a47 100644 --- a/t/030_roles/018_runtime_roles_w_params.t +++ b/t/030_roles/018_runtime_roles_w_params.t @@ -24,16 +24,16 @@ use Test::Exception; my $foo = Foo->new(bar => 'BAR'); isa_ok($foo, 'Foo'); - is($foo->bar, 'BAR', '... got the expect value'); - ok(!$foo->can('baz'), '... no baz method though'); + is($foo->bar, 'BAR', 'got the expect value'); + ok(!$foo->can('baz'), 'no baz method though'); lives_ok { Bar->meta->apply($foo) - } '... this works'; + } 'this works'; - is($foo->bar, 'BAR', '... got the expect value'); - ok($foo->can('baz'), '... we have baz method now'); - is($foo->baz, 'BAZ', '... got the expect value'); + is($foo->bar, 'BAR', 'got the expect value'); + ok($foo->can('baz'), 'we have baz method now'); + is($foo->baz, 'BAZ', 'got the expect value'); } # with extra params ... @@ -41,16 +41,16 @@ use Test::Exception; my $foo = Foo->new(bar => 'BAR'); isa_ok($foo, 'Foo'); - is($foo->bar, 'BAR', '... got the expect value'); - ok(!$foo->can('baz'), '... no baz method though'); + is($foo->bar, 'BAR', 'got the expect value'); + ok(!$foo->can('baz'), 'no baz method though'); lives_ok { Bar->meta->apply($foo, (rebless_params => { baz => 'FOO-BAZ' })) - } '... this works'; + } 'this works'; - is($foo->bar, 'BAR', '... got the expect value'); - ok($foo->can('baz'), '... we have baz method now'); - is($foo->baz, 'FOO-BAZ', '... got the expect value'); + is($foo->bar, 'BAR', 'got the expect value'); + ok($foo->can('baz'), 'we have baz method now'); + is($foo->baz, 'FOO-BAZ', 'got the expect value'); } # with extra params ... @@ -58,16 +58,16 @@ use Test::Exception; my $foo = Foo->new(bar => 'BAR'); isa_ok($foo, 'Foo'); - is($foo->bar, 'BAR', '... got the expect value'); - ok(!$foo->can('baz'), '... no baz method though'); + is($foo->bar, 'BAR', 'got the expect value'); + ok(!$foo->can('baz'), 'no baz method though'); lives_ok { Bar->meta->apply($foo, (rebless_params => { bar => 'FOO-BAR', baz => 'FOO-BAZ' })) - } '... this works'; + } 'this works'; - is($foo->bar, 'FOO-BAR', '... got the expect value'); - ok($foo->can('baz'), '... we have baz method now'); - is($foo->baz, 'FOO-BAZ', '... got the expect value'); + is($foo->bar, 'FOO-BAR', 'got the expect value'); + ok($foo->can('baz'), 'we have baz method now'); + is($foo->baz, 'FOO-BAZ', 'got the expect value'); } diff --git a/t/030_roles/020_role_composite.t b/t/030_roles/020_role_composite.t index 9f3b001..0626f72 100644 --- a/t/030_roles/020_role_composite.t +++ b/t/030_roles/020_role_composite.t @@ -33,15 +33,15 @@ use Moose::Meta::Role::Composite; ); isa_ok($c, 'Moose::Meta::Role::Composite'); - is($c->name, 'Role::Foo|Role::Bar|Role::Baz', '... got the composite role name'); + is($c->name, 'Role::Foo|Role::Bar|Role::Baz', 'got the composite role name'); is_deeply($c->get_roles, [ Role::Foo->meta, Role::Bar->meta, Role::Baz->meta, - ], '... got the right roles'); + ], 'got the right roles'); - ok($c->does_role($_), '... our composite does the role ' . $_) + ok($c->does_role($_), 'our composite does the role ' . $_) for qw( Role::Foo Role::Bar @@ -50,7 +50,7 @@ use Moose::Meta::Role::Composite; lives_ok { Moose::Meta::Role::Application::RoleSummation->new->apply($c); - } '... this composed okay'; + } 'this composed okay'; ##... now nest 'em { @@ -62,14 +62,14 @@ use Moose::Meta::Role::Composite; ); isa_ok($c2, 'Moose::Meta::Role::Composite'); - is($c2->name, 'Role::Foo|Role::Bar|Role::Baz|Role::Gorch', '... got the composite role name'); + is($c2->name, 'Role::Foo|Role::Bar|Role::Baz|Role::Gorch', 'got the composite role name'); is_deeply($c2->get_roles, [ $c, Role::Gorch->meta, - ], '... got the right roles'); + ], 'got the right roles'); - ok($c2->does_role($_), '... our composite does the role ' . $_) + ok($c2->does_role($_), 'our composite does the role ' . $_) for qw( Role::Foo Role::Bar diff --git a/t/030_roles/021_role_composite_exclusion.t b/t/030_roles/021_role_composite_exclusion.t index f12cb08..5d16a79 100644 --- a/t/030_roles/021_role_composite_exclusion.t +++ b/t/030_roles/021_role_composite_exclusion.t @@ -29,8 +29,8 @@ use Moose::Meta::Role::Composite; with 'Role::Foo'; } -ok(Role::ExcludesFoo->meta->excludes_role('Role::Foo'), '... got the right exclusions'); -ok(Role::DoesExcludesFoo->meta->excludes_role('Role::Foo'), '... got the right exclusions'); +ok(Role::ExcludesFoo->meta->excludes_role('Role::Foo'), 'got the right exclusions'); +ok(Role::DoesExcludesFoo->meta->excludes_role('Role::Foo'), 'got the right exclusions'); # test simple exclusion dies_ok { @@ -42,7 +42,7 @@ dies_ok { ] ) ); -} '... this fails as expected'; +} 'this fails as expected'; # test no conflicts { @@ -54,11 +54,11 @@ dies_ok { ); isa_ok($c, 'Moose::Meta::Role::Composite'); - is($c->name, 'Role::Foo|Role::Bar', '... got the composite role name'); + is($c->name, 'Role::Foo|Role::Bar', 'got the composite role name'); lives_ok { Moose::Meta::Role::Application::RoleSummation->new->apply($c); - } '... this lives as expected'; + } 'this lives as expected'; } # test no conflicts w/exclusion @@ -71,13 +71,13 @@ dies_ok { ); isa_ok($c, 'Moose::Meta::Role::Composite'); - is($c->name, 'Role::Bar|Role::ExcludesFoo', '... got the composite role name'); + is($c->name, 'Role::Bar|Role::ExcludesFoo', 'got the composite role name'); lives_ok { Moose::Meta::Role::Application::RoleSummation->new->apply($c); - } '... this lives as expected'; + } 'this lives as expected'; - is_deeply([$c->get_excluded_roles_list], ['Role::Foo'], '... has excluded roles'); + is_deeply([$c->get_excluded_roles_list], ['Role::Foo'], 'has excluded roles'); } @@ -92,7 +92,7 @@ dies_ok { ) ); -} '... this fails as expected'; +} 'this fails as expected'; # test conflict with an "inherited" exclusion of an "inherited" role dies_ok { @@ -104,6 +104,6 @@ dies_ok { ] ) ); -} '... this fails as expected'; +} 'this fails as expected'; diff --git a/t/030_roles/022_role_composition_req_methods.t b/t/030_roles/022_role_composition_req_methods.t index 2e6727e..afd21ba 100644 --- a/t/030_roles/022_role_composition_req_methods.t +++ b/t/030_roles/022_role_composition_req_methods.t @@ -37,16 +37,16 @@ use Moose::Meta::Role::Composite; ); isa_ok($c, 'Moose::Meta::Role::Composite'); - is($c->name, 'Role::Foo|Role::Bar', '... got the composite role name'); + is($c->name, 'Role::Foo|Role::Bar', 'got the composite role name'); lives_ok { Moose::Meta::Role::Application::RoleSummation->new->apply($c); - } '... this succeeds as expected'; + } 'this succeeds as expected'; is_deeply( [ sort $c->get_required_method_list ], [ 'bar', 'foo' ], - '... got the right list of required methods' + 'got the right list of required methods' ); } @@ -60,16 +60,16 @@ use Moose::Meta::Role::Composite; ); isa_ok($c, 'Moose::Meta::Role::Composite'); - is($c->name, 'Role::Foo|Role::ProvidesFoo', '... got the composite role name'); + is($c->name, 'Role::Foo|Role::ProvidesFoo', 'got the composite role name'); lives_ok { Moose::Meta::Role::Application::RoleSummation->new->apply($c); - } '... this succeeds as expected'; + } 'this succeeds as expected'; is_deeply( [ sort $c->get_required_method_list ], [], - '... got the right list of required methods' + 'got the right list of required methods' ); } @@ -84,16 +84,16 @@ use Moose::Meta::Role::Composite; ); isa_ok($c, 'Moose::Meta::Role::Composite'); - is($c->name, 'Role::Foo|Role::ProvidesFoo|Role::Bar', '... got the composite role name'); + is($c->name, 'Role::Foo|Role::ProvidesFoo|Role::Bar', 'got the composite role name'); lives_ok { Moose::Meta::Role::Application::RoleSummation->new->apply($c); - } '... this succeeds as expected'; + } 'this succeeds as expected'; is_deeply( [ sort $c->get_required_method_list ], [ 'bar' ], - '... got the right list of required methods' + 'got the right list of required methods' ); } @@ -109,16 +109,16 @@ use Moose::Meta::Role::Composite; ); isa_ok($c, 'Moose::Meta::Role::Composite'); - is($c->name, 'Role::Foo|Role::ProvidesFoo|Role::ProvidesBar|Role::Bar', '... got the composite role name'); + is($c->name, 'Role::Foo|Role::ProvidesFoo|Role::ProvidesBar|Role::Bar', 'got the composite role name'); lives_ok { Moose::Meta::Role::Application::RoleSummation->new->apply($c); - } '... this succeeds as expected'; + } 'this succeeds as expected'; is_deeply( [ sort $c->get_required_method_list ], [ ], - '... got the right list of required methods' + 'got the right list of required methods' ); } diff --git a/t/030_roles/023_role_composition_attributes.t b/t/030_roles/023_role_composition_attributes.t index 0086435..f59b87d 100644 --- a/t/030_roles/023_role_composition_attributes.t +++ b/t/030_roles/023_role_composition_attributes.t @@ -41,16 +41,16 @@ use Moose::Meta::Role::Composite; ); isa_ok($c, 'Moose::Meta::Role::Composite'); - is($c->name, 'Role::Foo|Role::Bar', '... got the composite role name'); + is($c->name, 'Role::Foo|Role::Bar', 'got the composite role name'); lives_ok { Moose::Meta::Role::Application::RoleSummation->new->apply($c); - } '... this succeeds as expected'; + } 'this succeeds as expected'; is_deeply( [ sort $c->get_attribute_list ], [ 'bar', 'foo' ], - '... got the right list of attributes' + 'got the right list of attributes' ); } @@ -64,7 +64,7 @@ dies_ok { ] ) ); -} '... this fails as expected'; +} 'this fails as expected'; # test complex conflict dies_ok { @@ -78,7 +78,7 @@ dies_ok { ] ) ); -} '... this fails as expected'; +} 'this fails as expected'; # test simple conflict dies_ok { @@ -90,5 +90,5 @@ dies_ok { ] ) ); -} '... this fails as expected'; +} 'this fails as expected'; diff --git a/t/030_roles/024_role_composition_methods.t b/t/030_roles/024_role_composition_methods.t index bf5c517..a1a6fb7 100644 --- a/t/030_roles/024_role_composition_methods.t +++ b/t/030_roles/024_role_composition_methods.t @@ -47,16 +47,16 @@ use Moose::Meta::Role::Composite; ); isa_ok($c, 'Moose::Meta::Role::Composite'); - is($c->name, 'Role::Foo|Role::Bar', '... got the composite role name'); + is($c->name, 'Role::Foo|Role::Bar', 'got the composite role name'); lives_ok { Moose::Meta::Role::Application::RoleSummation->new->apply($c); - } '... this succeeds as expected'; + } 'this succeeds as expected'; is_deeply( [ sort $c->get_method_list ], [ 'bar', 'foo' ], - '... got the right list of methods' + 'got the right list of methods' ); } @@ -70,22 +70,22 @@ use Moose::Meta::Role::Composite; ); isa_ok($c, 'Moose::Meta::Role::Composite'); - is($c->name, 'Role::Foo|Role::FooConflict', '... got the composite role name'); + is($c->name, 'Role::Foo|Role::FooConflict', 'got the composite role name'); lives_ok { Moose::Meta::Role::Application::RoleSummation->new->apply($c); - } '... this succeeds as expected'; + } 'this succeeds as expected'; is_deeply( [ sort $c->get_method_list ], [], - '... got the right list of methods' + 'got the right list of methods' ); is_deeply( [ sort $c->get_required_method_list ], [ 'foo' ], - '... got the right list of required methods' + 'got the right list of required methods' ); } @@ -101,22 +101,22 @@ use Moose::Meta::Role::Composite; ); isa_ok($c, 'Moose::Meta::Role::Composite'); - is($c->name, 'Role::Foo|Role::Bar|Role::FooConflict|Role::BarConflict', '... got the composite role name'); + is($c->name, 'Role::Foo|Role::Bar|Role::FooConflict|Role::BarConflict', 'got the composite role name'); lives_ok { Moose::Meta::Role::Application::RoleSummation->new->apply($c); - } '... this succeeds as expected'; + } 'this succeeds as expected'; is_deeply( [ sort $c->get_method_list ], [], - '... got the right list of methods' + 'got the right list of methods' ); is_deeply( [ sort $c->get_required_method_list ], [ 'bar', 'foo' ], - '... got the right list of required methods' + 'got the right list of required methods' ); } @@ -130,22 +130,22 @@ use Moose::Meta::Role::Composite; ); isa_ok($c, 'Moose::Meta::Role::Composite'); - is($c->name, 'Role::Foo|Role::AnotherFooConflict', '... got the composite role name'); + is($c->name, 'Role::Foo|Role::AnotherFooConflict', 'got the composite role name'); lives_ok { Moose::Meta::Role::Application::RoleSummation->new->apply($c); - } '... this succeeds as expected'; + } 'this succeeds as expected'; is_deeply( [ sort $c->get_method_list ], [ 'baz' ], - '... got the right list of methods' + 'got the right list of methods' ); is_deeply( [ sort $c->get_required_method_list ], [ 'foo' ], - '... got the right list of required methods' + 'got the right list of required methods' ); } diff --git a/t/030_roles/025_role_composition_override.t b/t/030_roles/025_role_composition_override.t index d47fd3b..2ed3762 100644 --- a/t/030_roles/025_role_composition_override.t +++ b/t/030_roles/025_role_composition_override.t @@ -46,16 +46,16 @@ use Moose::Meta::Role::Composite; ); isa_ok($c, 'Moose::Meta::Role::Composite'); - is($c->name, 'Role::Foo|Role::Bar', '... got the composite role name'); + is($c->name, 'Role::Foo|Role::Bar', 'got the composite role name'); lives_ok { Moose::Meta::Role::Application::RoleSummation->new->apply($c); - } '... this lives ok'; + } 'this lives ok'; is_deeply( [ sort $c->get_method_modifier_list('override') ], [ 'bar', 'foo' ], - '... got the right list of methods' + 'got the right list of methods' ); } @@ -69,7 +69,7 @@ dies_ok { ] ) ); -} '... this fails as expected'; +} 'this fails as expected'; # test simple overrides w/ conflicts dies_ok { @@ -81,7 +81,7 @@ dies_ok { ] ) ); -} '... this fails as expected'; +} 'this fails as expected'; # test simple overrides w/ conflicts @@ -95,7 +95,7 @@ dies_ok { ] ) ); -} '... this fails as expected'; +} 'this fails as expected'; # test simple overrides w/ conflicts @@ -109,4 +109,4 @@ dies_ok { ] ) ); -} '... this fails as expected'; +} 'this fails as expected'; diff --git a/t/030_roles/026_role_composition_method_mods.t b/t/030_roles/026_role_composition_method_mods.t index 9de99b4..dd075cc 100644 --- a/t/030_roles/026_role_composition_method_mods.t +++ b/t/030_roles/026_role_composition_method_mods.t @@ -60,27 +60,27 @@ use Moose::Meta::Role::Composite; ); isa_ok($c, 'Moose::Meta::Role::Composite'); - is($c->name, 'Role::Foo|Role::Bar', '... got the composite role name'); + is($c->name, 'Role::Foo|Role::Bar', 'got the composite role name'); lives_ok { Moose::Meta::Role::Application::RoleSummation->new->apply($c); - } '... this succeeds as expected'; + } 'this succeeds as expected'; is_deeply( [ sort $c->get_method_modifier_list('before') ], [ 'bar', 'foo' ], - '... got the right list of methods' + 'got the right list of methods' ); is_deeply( [ sort $c->get_method_modifier_list('after') ], [ 'bar', 'foo' ], - '... got the right list of methods' + 'got the right list of methods' ); is_deeply( [ sort $c->get_method_modifier_list('around') ], [ 'bar', 'baz', 'foo' ], - '... got the right list of methods' + 'got the right list of methods' ); } diff --git a/t/030_roles/032_roles_and_method_cloning.t b/t/030_roles/032_roles_and_method_cloning.t index 9cd45e0..e9f6d51 100644 --- a/t/030_roles/032_roles_and_method_cloning.t +++ b/t/030_roles/032_roles_and_method_cloning.t @@ -64,7 +64,7 @@ use Test::More tests => 17; is( $meth->original_method, Role::Bar->meta->get_method('foo'), 'ClassA->foo was cloned from Role::Bar->foo' ); is( $meth->original_method->original_method, Role::Foo->meta->get_method('foo'), - '... which in turn was cloned from Role::Foo->foo' ); + 'which in turn was cloned from Role::Foo->foo' ); is( $meth->fully_qualified_name, 'ClassB::foo', 'fq name is ClassA::foo' ); is( $meth->original_fully_qualified_name, 'Role::Foo::foo', diff --git a/t/030_roles/033_role_exclusion_and_alias_bug.t b/t/030_roles/033_role_exclusion_and_alias_bug.t index ac1b11a..7511a1c 100644 --- a/t/030_roles/033_role_exclusion_and_alias_bug.t +++ b/t/030_roles/033_role_exclusion_and_alias_bug.t @@ -31,10 +31,10 @@ use Test::Moose; can_ok($x, $_) for qw[baz gorch]; - ok(!$x->can($_), '... cant call method ' . $_) for qw[foo bar]; + ok(!$x->can($_), 'cant call method ' . $_) for qw[foo bar]; - is($x->baz, 'FOO', '... got the right value'); - is($x->gorch, 'BAR', '... got the right value'); + is($x->baz, 'FOO', 'got the right value'); + is($x->gorch, 'BAR', 'got the right value'); } { @@ -60,10 +60,10 @@ use Test::Moose; can_ok($x, $_) for qw[baz gorch]; - ok(!$x->can($_), '... cant call method ' . $_) for qw[foo bar]; + ok(!$x->can($_), 'cant call method ' . $_) for qw[foo bar]; - is($x->baz, 'FOO', '... got the right value'); - is($x->gorch, 'BAR', '... got the right value'); + is($x->baz, 'FOO', 'got the right value'); + is($x->gorch, 'BAR', 'got the right value'); } diff --git a/t/040_type_constraints/001_util_type_constraints.t b/t/040_type_constraints/001_util_type_constraints.t index cf4e7e5..284e625 100644 --- a/t/040_type_constraints/001_util_type_constraints.t +++ b/t/040_type_constraints/001_util_type_constraints.t @@ -27,96 +27,96 @@ subtype NaturalLessThanTen Moose::Util::TypeConstraints->export_type_constraints_as_functions(); -ok(Number(5), '... this is a Num'); -ok(!defined(Number('Foo')), '... this is not a Num'); +ok(Number(5), 'this is a Num'); +ok(!defined(Number('Foo')), 'this is not a Num'); { my $number_tc = Moose::Util::TypeConstraints::find_type_constraint('Number'); - is("$number_tc", 'Number', '... type constraint stringifies to name'); + is("$number_tc", 'Number', 'type constraint stringifies to name'); } -ok(String('Foo'), '... this is a Str'); -ok(!defined(String(5)), '... this is not a Str'); +ok(String('Foo'), 'this is a Str'); +ok(!defined(String(5)), 'this is not a Str'); -ok(Natural(5), '... this is a Natural'); -is(Natural(-5), undef, '... this is not a Natural'); -is(Natural('Foo'), undef, '... this is not a Natural'); +ok(Natural(5), 'this is a Natural'); +is(Natural(-5), undef, 'this is not a Natural'); +is(Natural('Foo'), undef, 'this is not a Natural'); -ok(NaturalLessThanTen(5), '... this is a NaturalLessThanTen'); -is(NaturalLessThanTen(12), undef, '... this is not a NaturalLessThanTen'); -is(NaturalLessThanTen(-5), undef, '... this is not a NaturalLessThanTen'); -is(NaturalLessThanTen('Foo'), undef, '... this is not a NaturalLessThanTen'); +ok(NaturalLessThanTen(5), 'this is a NaturalLessThanTen'); +is(NaturalLessThanTen(12), undef, 'this is not a NaturalLessThanTen'); +is(NaturalLessThanTen(-5), undef, 'this is not a NaturalLessThanTen'); +is(NaturalLessThanTen('Foo'), undef, 'this is not a NaturalLessThanTen'); # anon sub-typing my $negative = subtype Number => where { $_ < 0 }; -ok(defined $negative, '... got a value back from negative'); +ok(defined $negative, 'got a value back from negative'); isa_ok($negative, 'Moose::Meta::TypeConstraint'); -ok($negative->check(-5), '... this is a negative number'); -ok(!defined($negative->check(5)), '... this is not a negative number'); -is($negative->check('Foo'), undef, '... this is not a negative number'); +ok($negative->check(-5), 'this is a negative number'); +ok(!defined($negative->check(5)), 'this is not a negative number'); +is($negative->check('Foo'), undef, 'this is not a negative number'); -ok($negative->is_subtype_of('Number'), '... $negative is a subtype of Number'); -ok(!$negative->is_subtype_of('String'), '... $negative is not a subtype of String'); +ok($negative->is_subtype_of('Number'), '$negative is a subtype of Number'); +ok(!$negative->is_subtype_of('String'), '$negative is not a subtype of String'); my $negative2 = subtype Number => where { $_ < 0 } => message {"$_ is not a negative number"}; -ok(defined $negative2, '... got a value back from negative'); +ok(defined $negative2, 'got a value back from negative'); isa_ok($negative2, 'Moose::Meta::TypeConstraint'); -ok($negative2->check(-5), '... this is a negative number'); -ok(!defined($negative2->check(5)), '... this is not a negative number'); -is($negative2->check('Foo'), undef, '... this is not a negative number'); +ok($negative2->check(-5), 'this is a negative number'); +ok(!defined($negative2->check(5)), 'this is not a negative number'); +is($negative2->check('Foo'), undef, 'this is not a negative number'); -ok($negative2->is_subtype_of('Number'), '... $negative2 is a subtype of Number'); -ok(!$negative2->is_subtype_of('String'), '... $negative is not a subtype of String'); +ok($negative2->is_subtype_of('Number'), '$negative2 is a subtype of Number'); +ok(!$negative2->is_subtype_of('String'), '$negative is not a subtype of String'); -ok($negative2->has_message, '... it has a message'); +ok($negative2->has_message, 'it has a message'); is($negative2->validate(2), '2 is not a negative number', - '... validated unsuccessfully (got error)'); + 'validated unsuccessfully (got error)'); # check some meta-details my $natural_less_than_ten = find_type_constraint('NaturalLessThanTen'); isa_ok($natural_less_than_ten, 'Moose::Meta::TypeConstraint'); -ok($natural_less_than_ten->is_subtype_of('Natural'), '... NaturalLessThanTen is subtype of Natural'); -ok($natural_less_than_ten->is_subtype_of('Number'), '... NaturalLessThanTen is subtype of Number'); -ok(!$natural_less_than_ten->is_subtype_of('String'), '... NaturalLessThanTen is not subtype of String'); +ok($natural_less_than_ten->is_subtype_of('Natural'), 'NaturalLessThanTen is subtype of Natural'); +ok($natural_less_than_ten->is_subtype_of('Number'), 'NaturalLessThanTen is subtype of Number'); +ok(!$natural_less_than_ten->is_subtype_of('String'), 'NaturalLessThanTen is not subtype of String'); -ok($natural_less_than_ten->has_message, '... it has a message'); +ok($natural_less_than_ten->has_message, 'it has a message'); -ok(!defined($natural_less_than_ten->validate(5)), '... validated successfully (no error)'); +ok(!defined($natural_less_than_ten->validate(5)), 'validated successfully (no error)'); is($natural_less_than_ten->validate(15), "The number '15' is not less than 10", - '... validated unsuccessfully (got error)'); + 'validated unsuccessfully (got error)'); my $natural = find_type_constraint('Natural'); isa_ok($natural, 'Moose::Meta::TypeConstraint'); -ok($natural->is_subtype_of('Number'), '... Natural is a subtype of Number'); -ok(!$natural->is_subtype_of('String'), '... Natural is not a subtype of String'); +ok($natural->is_subtype_of('Number'), 'Natural is a subtype of Number'); +ok(!$natural->is_subtype_of('String'), 'Natural is not a subtype of String'); -ok(!$natural->has_message, '... it does not have a message'); +ok(!$natural->has_message, 'it does not have a message'); -ok(!defined($natural->validate(5)), '... validated successfully (no error)'); +ok(!defined($natural->validate(5)), 'validated successfully (no error)'); is($natural->validate(-5), "Validation failed for 'Natural' failed with value -5", - '... validated unsuccessfully (got error)'); + 'validated unsuccessfully (got error)'); my $string = find_type_constraint('String'); isa_ok($string, 'Moose::Meta::TypeConstraint'); -ok($string->has_message, '... it does have a message'); +ok($string->has_message, 'it does have a message'); -ok(!defined($string->validate("Five")), '... validated successfully (no error)'); +ok(!defined($string->validate("Five")), 'validated successfully (no error)'); is($string->validate(5), "This is not a string (5)", -'... validated unsuccessfully (got error)'); +'validated unsuccessfully (got error)'); lives_ok { Moose::Meta::Attribute->new('bob', isa => 'Spong') } 'meta-attr construction ok even when type constraint utils loaded first'; @@ -196,32 +196,32 @@ throws_ok {$r->add_type_constraint(bless {}, 'SomeClass')} qr/not a valid type c { my $type = type( 'Number2', sub { Scalar::Util::looks_like_number($_) } ); - ok( $type->check(5), '... this is a Num' ); - ok( ! $type->check('Foo'), '... this is not a Num' ); + ok( $type->check(5), 'this is a Num' ); + ok( ! $type->check('Foo'), 'this is not a Num' ); } { # anon subtype my $subtype = subtype( 'Number2', sub { $_ > 0 } ); - ok( $subtype->check(5), '... this is a Natural'); - ok( ! $subtype->check(-5), '... this is not a Natural'); - ok( ! $subtype->check('Foo'), '... this is not a Natural'); + ok( $subtype->check(5), 'this is a Natural'); + ok( ! $subtype->check(-5), 'this is not a Natural'); + ok( ! $subtype->check('Foo'), 'this is not a Natural'); } { my $subtype = subtype( 'Natural2', 'Number2', sub { $_ > 0 } ); - ok( $subtype->check(5), '... this is a Natural'); - ok( ! $subtype->check(-5), '... this is not a Natural'); - ok( ! $subtype->check('Foo'), '... this is not a Natural'); + ok( $subtype->check(5), 'this is a Natural'); + ok( ! $subtype->check(-5), 'this is not a Natural'); + ok( ! $subtype->check('Foo'), 'this is not a Natural'); } { my $subtype = subtype( 'Natural3', 'Number2' ); - ok( $subtype->check(5), '... this is a Natural'); - ok( $subtype->check(-5), '... this is a Natural'); - ok( ! $subtype->check('Foo'), '... this is not a Natural'); + ok( $subtype->check(5), 'this is a Natural'); + ok( $subtype->check(-5), 'this is a Natural'); + ok( ! $subtype->check('Foo'), 'this is not a Natural'); } diff --git a/t/040_type_constraints/002_util_type_constraints_export.t b/t/040_type_constraints/002_util_type_constraints_export.t index 7ef7ad1..1e6c0f7 100644 --- a/t/040_type_constraints/002_util_type_constraints_export.t +++ b/t/040_type_constraints/002_util_type_constraints_export.t @@ -14,15 +14,15 @@ use Test::Exception; eval { type MyRef => where { ref($_) }; }; - ::ok( !$@, '... successfully exported &type to Foo package' ); + ::ok( !$@, 'successfully exported &type to Foo package' ); eval { subtype MyArrayRef => as MyRef => where { ref($_) eq 'ARRAY' }; }; - ::ok( !$@, '... successfully exported &subtype to Foo package' ); + ::ok( !$@, 'successfully exported &subtype to Foo package' ); Moose::Util::TypeConstraints->export_type_constraints_as_functions(); - ::ok( MyRef( {} ), '... Ref worked correctly' ); - ::ok( MyArrayRef( [] ), '... ArrayRef worked correctly' ); + ::ok( MyRef( {} ), 'Ref worked correctly' ); + ::ok( MyArrayRef( [] ), 'ArrayRef worked correctly' ); } diff --git a/t/040_type_constraints/003_util_std_type_constraints.t b/t/040_type_constraints/003_util_std_type_constraints.t index bb1ded0..d1ba610 100644 --- a/t/040_type_constraints/003_util_std_type_constraints.t +++ b/t/040_type_constraints/003_util_std_type_constraints.t @@ -24,269 +24,269 @@ my $fh_obj = bless {}, "IO::Handle"; # not really Moose::Util::TypeConstraints->export_type_constraints_as_functions(); -ok(defined Any(0), '... Any accepts anything'); -ok(defined Any(100), '... Any accepts anything'); -ok(defined Any(''), '... Any accepts anything'); -ok(defined Any('Foo'), '... Any accepts anything'); -ok(defined Any([]), '... Any accepts anything'); -ok(defined Any({}), '... Any accepts anything'); -ok(defined Any(sub {}), '... Any accepts anything'); -ok(defined Any($SCALAR_REF), '... Any accepts anything'); -ok(defined Any($GLOB_REF), '... Any accepts anything'); -ok(defined Any($fh), '... Any accepts anything'); -ok(defined Any(qr/../), '... Any accepts anything'); -ok(defined Any(bless {}, 'Foo'), '... Any accepts anything'); -ok(defined Any(undef), '... Any accepts anything'); - -ok(defined Item(0), '... Item is the base type, so accepts anything'); -ok(defined Item(100), '... Item is the base type, so accepts anything'); -ok(defined Item(''), '... Item is the base type, so accepts anything'); -ok(defined Item('Foo'), '... Item is the base type, so accepts anything'); -ok(defined Item([]), '... Item is the base type, so accepts anything'); -ok(defined Item({}), '... Item is the base type, so accepts anything'); -ok(defined Item(sub {}), '... Item is the base type, so accepts anything'); -ok(defined Item($SCALAR_REF), '... Item is the base type, so accepts anything'); -ok(defined Item($GLOB_REF), '... Item is the base type, so accepts anything'); -ok(defined Item($fh), '... Item is the base type, so accepts anything'); -ok(defined Item(qr/../), '... Item is the base type, so accepts anything'); -ok(defined Item(bless {}, 'Foo'), '... Item is the base type, so accepts anything'); -ok(defined Item(undef), '... Item is the base type, so accepts anything'); - -ok(defined Defined(0), '... Defined accepts anything which is defined'); -ok(defined Defined(100), '... Defined accepts anything which is defined'); -ok(defined Defined(''), '... Defined accepts anything which is defined'); -ok(defined Defined('Foo'), '... Defined accepts anything which is defined'); -ok(defined Defined([]), '... Defined accepts anything which is defined'); -ok(defined Defined({}), '... Defined accepts anything which is defined'); -ok(defined Defined(sub {}), '... Defined accepts anything which is defined'); -ok(defined Defined($SCALAR_REF), '... Defined accepts anything which is defined'); -ok(defined Defined($GLOB_REF), '... Defined accepts anything which is defined'); -ok(defined Defined($fh), '... Defined accepts anything which is defined'); -ok(defined Defined(qr/../), '... Defined accepts anything which is defined'); -ok(defined Defined(bless {}, 'Foo'), '... Defined accepts anything which is defined'); -ok(!defined Defined(undef), '... Defined accepts anything which is defined'); - -ok(!defined Undef(0), '... Undef accepts anything which is not defined'); -ok(!defined Undef(100), '... Undef accepts anything which is not defined'); -ok(!defined Undef(''), '... Undef accepts anything which is not defined'); -ok(!defined Undef('Foo'), '... Undef accepts anything which is not defined'); -ok(!defined Undef([]), '... Undef accepts anything which is not defined'); -ok(!defined Undef({}), '... Undef accepts anything which is not defined'); -ok(!defined Undef(sub {}), '... Undef accepts anything which is not defined'); -ok(!defined Undef($SCALAR_REF), '... Undef accepts anything which is not defined'); -ok(!defined Undef($GLOB_REF), '... Undef accepts anything which is not defined'); -ok(!defined Undef($fh), '... Undef accepts anything which is not defined'); -ok(!defined Undef(qr/../), '... Undef accepts anything which is not defined'); -ok(!defined Undef(bless {}, 'Foo'), '... Undef accepts anything which is not defined'); -ok(defined Undef(undef), '... Undef accepts anything which is not defined'); - -ok(defined Bool(0), '... Bool rejects anything which is not a 1 or 0 or "" or undef'); -ok(defined Bool(1), '... Bool rejects anything which is not a 1 or 0 or "" or undef'); -ok(!defined Bool(100), '... Bool rejects anything which is not a 1 or 0 or "" or undef'); -ok(defined Bool(''), '... Bool rejects anything which is not a 1 or 0 or "" or undef'); -ok(!defined Bool('Foo'), '... Bool rejects anything which is not a 1 or 0 or "" or undef'); -ok(!defined Bool([]), '... Bool rejects anything which is not a 1 or 0 or "" or undef'); -ok(!defined Bool({}), '... Bool rejects anything which is not a 1 or 0 or "" or undef'); -ok(!defined Bool(sub {}), '... Bool rejects anything which is not a 1 or 0 or "" or undef'); -ok(!defined Bool($SCALAR_REF), '... Bool rejects anything which is not a 1 or 0 or "" or undef'); -ok(!defined Bool($GLOB_REF), '... Bool rejects anything which is not a 1 or 0 or "" or undef'); -ok(!defined Bool($fh), '... Bool rejects anything which is not a 1 or 0 or "" or undef'); -ok(!defined Bool(qr/../), '... Bool rejects anything which is not a 1 or 0 or "" or undef'); -ok(!defined Bool(bless {}, 'Foo'), '... Bool rejects anything which is not a 1 or 0 or "" or undef'); -ok(defined Bool(undef), '... Bool rejects anything which is not a 1 or 0 or "" or undef'); - -ok(defined Value(0), '... Value accepts anything which is not a Ref'); -ok(defined Value(100), '... Value accepts anything which is not a Ref'); -ok(defined Value(''), '... Value accepts anything which is not a Ref'); -ok(defined Value('Foo'), '... Value accepts anything which is not a Ref'); -ok(!defined Value([]), '... Value rejects anything which is not a Value'); -ok(!defined Value({}), '... Value rejects anything which is not a Value'); -ok(!defined Value(sub {}), '... Value rejects anything which is not a Value'); -ok(!defined Value($SCALAR_REF), '... Value rejects anything which is not a Value'); -ok(!defined Value($GLOB_REF), '... Value rejects anything which is not a Value'); -ok(!defined Value($fh), '... Value rejects anything which is not a Value'); -ok(!defined Value(qr/../), '... Value rejects anything which is not a Value'); -ok(!defined Value(bless {}, 'Foo'), '... Value rejects anything which is not a Value'); -ok(!defined Value(undef), '... Value rejects anything which is not a Value'); - -ok(!defined Ref(0), '... Ref accepts anything which is not a Value'); -ok(!defined Ref(100), '... Ref accepts anything which is not a Value'); -ok(!defined Ref(''), '... Ref accepts anything which is not a Value'); -ok(!defined Ref('Foo'), '... Ref accepts anything which is not a Value'); -ok(defined Ref([]), '... Ref rejects anything which is not a Ref'); -ok(defined Ref({}), '... Ref rejects anything which is not a Ref'); -ok(defined Ref(sub {}), '... Ref rejects anything which is not a Ref'); -ok(defined Ref($SCALAR_REF), '... Ref rejects anything which is not a Ref'); -ok(defined Ref($GLOB_REF), '... Ref rejects anything which is not a Ref'); -ok(defined Ref($fh), '... Ref rejects anything which is not a Ref'); -ok(defined Ref(qr/../), '... Ref rejects anything which is not a Ref'); -ok(defined Ref(bless {}, 'Foo'), '... Ref rejects anything which is not a Ref'); -ok(!defined Ref(undef), '... Ref rejects anything which is not a Ref'); - -ok(defined Int(0), '... Int accepts anything which is an Int'); -ok(defined Int(100), '... Int accepts anything which is an Int'); -ok(!defined Int(0.5), '... Int accepts anything which is not a Int'); -ok(!defined Int(100.01), '... Int accepts anything which is not a Int'); -ok(!defined Int(''), '... Int rejects anything which is not a Int'); -ok(!defined Int('Foo'), '... Int rejects anything which is not a Int'); -ok(!defined Int([]), '... Int rejects anything which is not a Int'); -ok(!defined Int({}), '... Int rejects anything which is not a Int'); -ok(!defined Int(sub {}), '... Int rejects anything which is not a Int'); -ok(!defined Int($SCALAR_REF), '... Int rejects anything which is not a Int'); -ok(!defined Int($GLOB_REF), '... Int rejects anything which is not a Int'); -ok(!defined Int($fh), '... Int rejects anything which is not a Int'); -ok(!defined Int(qr/../), '... Int rejects anything which is not a Int'); -ok(!defined Int(bless {}, 'Foo'), '... Int rejects anything which is not a Int'); -ok(!defined Int(undef), '... Int rejects anything which is not a Int'); - -ok(defined Num(0), '... Num accepts anything which is an Num'); -ok(defined Num(100), '... Num accepts anything which is an Num'); -ok(defined Num(0.5), '... Num accepts anything which is an Num'); -ok(defined Num(100.01), '... Num accepts anything which is an Num'); -ok(!defined Num(''), '... Num rejects anything which is not a Num'); -ok(!defined Num('Foo'), '... Num rejects anything which is not a Num'); -ok(!defined Num([]), '... Num rejects anything which is not a Num'); -ok(!defined Num({}), '... Num rejects anything which is not a Num'); -ok(!defined Num(sub {}), '... Num rejects anything which is not a Num'); -ok(!defined Num($SCALAR_REF), '... Num rejects anything which is not a Num'); -ok(!defined Num($GLOB_REF), '... Num rejects anything which is not a Num'); -ok(!defined Num($fh), '... Num rejects anything which is not a Num'); -ok(!defined Num(qr/../), '... Num rejects anything which is not a Num'); -ok(!defined Num(bless {}, 'Foo'), '... Num rejects anything which is not a Num'); -ok(!defined Num(undef), '... Num rejects anything which is not a Num'); - -ok(defined Str(0), '... Str accepts anything which is a Str'); -ok(defined Str(100), '... Str accepts anything which is a Str'); -ok(defined Str(''), '... Str accepts anything which is a Str'); -ok(defined Str('Foo'), '... Str accepts anything which is a Str'); -ok(!defined Str([]), '... Str rejects anything which is not a Str'); -ok(!defined Str({}), '... Str rejects anything which is not a Str'); -ok(!defined Str(sub {}), '... Str rejects anything which is not a Str'); -ok(!defined Str($SCALAR_REF), '... Str rejects anything which is not a Str'); -ok(!defined Str($fh), '... Str rejects anything which is not a Str'); -ok(!defined Str($GLOB_REF), '... Str rejects anything which is not a Str'); -ok(!defined Str(qr/../), '... Str rejects anything which is not a Str'); -ok(!defined Str(bless {}, 'Foo'), '... Str rejects anything which is not a Str'); -ok(!defined Str(undef), '... Str rejects anything which is not a Str'); - -ok(!defined ScalarRef(0), '... ScalarRef rejects anything which is not a ScalarRef'); -ok(!defined ScalarRef(100), '... ScalarRef rejects anything which is not a ScalarRef'); -ok(!defined ScalarRef(''), '... ScalarRef rejects anything which is not a ScalarRef'); -ok(!defined ScalarRef('Foo'), '... ScalarRef rejects anything which is not a ScalarRef'); -ok(!defined ScalarRef([]), '... ScalarRef rejects anything which is not a ScalarRef'); -ok(!defined ScalarRef({}), '... ScalarRef rejects anything which is not a ScalarRef'); -ok(!defined ScalarRef(sub {}), '... ScalarRef rejects anything which is not a ScalarRef'); -ok(defined ScalarRef($SCALAR_REF), '... ScalarRef accepts anything which is a ScalarRef'); -ok(!defined ScalarRef($GLOB_REF), '... ScalarRef rejects anything which is not a ScalarRef'); -ok(!defined ScalarRef($fh), '... ScalarRef rejects anything which is not a ScalarRef'); -ok(!defined ScalarRef(qr/../), '... ScalarRef rejects anything which is not a ScalarRef'); -ok(!defined ScalarRef(bless {}, 'Foo'), '... ScalarRef rejects anything which is not a ScalarRef'); -ok(!defined ScalarRef(undef), '... ScalarRef rejects anything which is not a ScalarRef'); - -ok(!defined ArrayRef(0), '... ArrayRef rejects anything which is not a ArrayRef'); -ok(!defined ArrayRef(100), '... ArrayRef rejects anything which is not a ArrayRef'); -ok(!defined ArrayRef(''), '... ArrayRef rejects anything which is not a ArrayRef'); -ok(!defined ArrayRef('Foo'), '... ArrayRef rejects anything which is not a ArrayRef'); -ok(defined ArrayRef([]), '... ArrayRef accepts anything which is a ArrayRef'); -ok(!defined ArrayRef({}), '... ArrayRef rejects anything which is not a ArrayRef'); -ok(!defined ArrayRef(sub {}), '... ArrayRef rejects anything which is not a ArrayRef'); -ok(!defined ArrayRef($SCALAR_REF), '... ArrayRef rejects anything which is not a ArrayRef'); -ok(!defined ArrayRef($GLOB_REF), '... ArrayRef rejects anything which is not a ArrayRef'); -ok(!defined ArrayRef($fh), '... ArrayRef rejects anything which is not a ArrayRef'); -ok(!defined ArrayRef(qr/../), '... ArrayRef rejects anything which is not a ArrayRef'); -ok(!defined ArrayRef(bless {}, 'Foo'), '... ArrayRef rejects anything which is not a ArrayRef'); -ok(!defined ArrayRef(undef), '... ArrayRef rejects anything which is not a ArrayRef'); - -ok(!defined HashRef(0), '... HashRef rejects anything which is not a HashRef'); -ok(!defined HashRef(100), '... HashRef rejects anything which is not a HashRef'); -ok(!defined HashRef(''), '... HashRef rejects anything which is not a HashRef'); -ok(!defined HashRef('Foo'), '... HashRef rejects anything which is not a HashRef'); -ok(!defined HashRef([]), '... HashRef rejects anything which is not a HashRef'); -ok(defined HashRef({}), '... HashRef accepts anything which is a HashRef'); -ok(!defined HashRef(sub {}), '... HashRef rejects anything which is not a HashRef'); -ok(!defined HashRef($SCALAR_REF), '... HashRef rejects anything which is not a HashRef'); -ok(!defined HashRef($GLOB_REF), '... HashRef rejects anything which is not a HashRef'); -ok(!defined HashRef($fh), '... HashRef rejects anything which is not a HashRef'); -ok(!defined HashRef(qr/../), '... HashRef rejects anything which is not a HashRef'); -ok(!defined HashRef(bless {}, 'Foo'), '... HashRef rejects anything which is not a HashRef'); -ok(!defined HashRef(undef), '... HashRef rejects anything which is not a HashRef'); - -ok(!defined CodeRef(0), '... CodeRef rejects anything which is not a CodeRef'); -ok(!defined CodeRef(100), '... CodeRef rejects anything which is not a CodeRef'); -ok(!defined CodeRef(''), '... CodeRef rejects anything which is not a CodeRef'); -ok(!defined CodeRef('Foo'), '... CodeRef rejects anything which is not a CodeRef'); -ok(!defined CodeRef([]), '... CodeRef rejects anything which is not a CodeRef'); -ok(!defined CodeRef({}), '... CodeRef rejects anything which is not a CodeRef'); -ok(defined CodeRef(sub {}), '... CodeRef accepts anything which is a CodeRef'); -ok(!defined CodeRef($SCALAR_REF), '... CodeRef rejects anything which is not a CodeRef'); -ok(!defined CodeRef($GLOB_REF), '... CodeRef rejects anything which is not a CodeRef'); -ok(!defined CodeRef($fh), '... CodeRef rejects anything which is not a CodeRef'); -ok(!defined CodeRef(qr/../), '... CodeRef rejects anything which is not a CodeRef'); -ok(!defined CodeRef(bless {}, 'Foo'), '... CodeRef rejects anything which is not a CodeRef'); -ok(!defined CodeRef(undef), '... CodeRef rejects anything which is not a CodeRef'); - -ok(!defined RegexpRef(0), '... RegexpRef rejects anything which is not a RegexpRef'); -ok(!defined RegexpRef(100), '... RegexpRef rejects anything which is not a RegexpRef'); -ok(!defined RegexpRef(''), '... RegexpRef rejects anything which is not a RegexpRef'); -ok(!defined RegexpRef('Foo'), '... RegexpRef rejects anything which is not a RegexpRef'); -ok(!defined RegexpRef([]), '... RegexpRef rejects anything which is not a RegexpRef'); -ok(!defined RegexpRef({}), '... RegexpRef rejects anything which is not a RegexpRef'); -ok(!defined RegexpRef(sub {}), '... RegexpRef rejects anything which is not a RegexpRef'); -ok(!defined RegexpRef($SCALAR_REF), '... RegexpRef rejects anything which is not a RegexpRef'); -ok(!defined RegexpRef($GLOB_REF), '... RegexpRef rejects anything which is not a RegexpRef'); -ok(!defined RegexpRef($fh), '... RegexpRef rejects anything which is not a RegexpRef'); -ok(defined RegexpRef(qr/../), '... RegexpRef accepts anything which is a RegexpRef'); -ok(!defined RegexpRef(bless {}, 'Foo'), '... RegexpRef rejects anything which is not a RegexpRef'); -ok(!defined RegexpRef(undef), '... RegexpRef rejects anything which is not a RegexpRef'); - -ok(!defined GlobRef(0), '... GlobRef rejects anything which is not a GlobRef'); -ok(!defined GlobRef(100), '... GlobRef rejects anything which is not a GlobRef'); -ok(!defined GlobRef(''), '... GlobRef rejects anything which is not a GlobRef'); -ok(!defined GlobRef('Foo'), '... GlobRef rejects anything which is not a GlobRef'); -ok(!defined GlobRef([]), '... GlobRef rejects anything which is not a GlobRef'); -ok(!defined GlobRef({}), '... GlobRef rejects anything which is not a GlobRef'); -ok(!defined GlobRef(sub {}), '... GlobRef rejects anything which is not a GlobRef'); -ok(!defined GlobRef($SCALAR_REF), '... GlobRef rejects anything which is not a GlobRef'); -ok(defined GlobRef($GLOB_REF), '... GlobRef accepts anything which is a GlobRef'); -ok(defined GlobRef($fh), '... GlobRef accepts anything which is a GlobRef'); -ok(!defined GlobRef($fh_obj), '... GlobRef rejects anything which is not a GlobRef'); -ok(!defined GlobRef(qr/../), '... GlobRef rejects anything which is not a GlobRef'); -ok(!defined GlobRef(bless {}, 'Foo'), '... GlobRef rejects anything which is not a GlobRef'); -ok(!defined GlobRef(undef), '... GlobRef rejects anything which is not a GlobRef'); - -ok(!defined FileHandle(0), '... FileHandle rejects anything which is not a FileHandle'); -ok(!defined FileHandle(100), '... FileHandle rejects anything which is not a FileHandle'); -ok(!defined FileHandle(''), '... FileHandle rejects anything which is not a FileHandle'); -ok(!defined FileHandle('Foo'), '... FileHandle rejects anything which is not a FileHandle'); -ok(!defined FileHandle([]), '... FileHandle rejects anything which is not a FileHandle'); -ok(!defined FileHandle({}), '... FileHandle rejects anything which is not a FileHandle'); -ok(!defined FileHandle(sub {}), '... FileHandle rejects anything which is not a FileHandle'); -ok(!defined FileHandle($SCALAR_REF), '... FileHandle rejects anything which is not a FileHandle'); -ok(!defined FileHandle($GLOB_REF), '... FileHandle rejects anything which is not a FileHandle'); -ok(defined FileHandle($fh), '... FileHandle accepts anything which is a FileHandle'); -ok(defined FileHandle($fh_obj), '... FileHandle accepts anything which is a FileHandle'); -ok(!defined FileHandle(qr/../), '... FileHandle rejects anything which is not a FileHandle'); -ok(!defined FileHandle(bless {}, 'Foo'), '... FileHandle rejects anything which is not a FileHandle'); -ok(!defined FileHandle(undef), '... FileHandle rejects anything which is not a FileHandle'); - -ok(!defined Object(0), '... Object rejects anything which is not blessed'); -ok(!defined Object(100), '... Object rejects anything which is not blessed'); -ok(!defined Object(''), '... Object rejects anything which is not blessed'); -ok(!defined Object('Foo'), '... Object rejects anything which is not blessed'); -ok(!defined Object([]), '... Object rejects anything which is not blessed'); -ok(!defined Object({}), '... Object rejects anything which is not blessed'); -ok(!defined Object(sub {}), '... Object rejects anything which is not blessed'); -ok(!defined Object($SCALAR_REF), '... Object rejects anything which is not blessed'); -ok(!defined Object($GLOB_REF), '... Object rejects anything which is not blessed'); -ok(!defined Object($fh), '... Object rejects anything which is not blessed'); -ok(!defined Object(qr/../), '... Object rejects anything which is not blessed'); -ok(defined Object(bless {}, 'Foo'), '... Object accepts anything which is blessed'); -ok(!defined Object(undef), '... Object accepts anything which is blessed'); - -ok(!defined ClassName(0), '... ClassName rejects anything which is not a ClassName'); -ok(!defined ClassName(100), '... ClassName rejects anything which is not a ClassName'); -ok(!defined ClassName(''), '... ClassName rejects anything which is not a ClassName'); -ok(!defined ClassName('Baz'), '... ClassName rejects anything which is not a ClassName'); +ok(defined Any(0), 'Any accepts anything'); +ok(defined Any(100), 'Any accepts anything'); +ok(defined Any(''), 'Any accepts anything'); +ok(defined Any('Foo'), 'Any accepts anything'); +ok(defined Any([]), 'Any accepts anything'); +ok(defined Any({}), 'Any accepts anything'); +ok(defined Any(sub {}), 'Any accepts anything'); +ok(defined Any($SCALAR_REF), 'Any accepts anything'); +ok(defined Any($GLOB_REF), 'Any accepts anything'); +ok(defined Any($fh), 'Any accepts anything'); +ok(defined Any(qr/../), 'Any accepts anything'); +ok(defined Any(bless {}, 'Foo'), 'Any accepts anything'); +ok(defined Any(undef), 'Any accepts anything'); + +ok(defined Item(0), 'Item is the base type, so accepts anything'); +ok(defined Item(100), 'Item is the base type, so accepts anything'); +ok(defined Item(''), 'Item is the base type, so accepts anything'); +ok(defined Item('Foo'), 'Item is the base type, so accepts anything'); +ok(defined Item([]), 'Item is the base type, so accepts anything'); +ok(defined Item({}), 'Item is the base type, so accepts anything'); +ok(defined Item(sub {}), 'Item is the base type, so accepts anything'); +ok(defined Item($SCALAR_REF), 'Item is the base type, so accepts anything'); +ok(defined Item($GLOB_REF), 'Item is the base type, so accepts anything'); +ok(defined Item($fh), 'Item is the base type, so accepts anything'); +ok(defined Item(qr/../), 'Item is the base type, so accepts anything'); +ok(defined Item(bless {}, 'Foo'), 'Item is the base type, so accepts anything'); +ok(defined Item(undef), 'Item is the base type, so accepts anything'); + +ok(defined Defined(0), 'Defined accepts anything which is defined'); +ok(defined Defined(100), 'Defined accepts anything which is defined'); +ok(defined Defined(''), 'Defined accepts anything which is defined'); +ok(defined Defined('Foo'), 'Defined accepts anything which is defined'); +ok(defined Defined([]), 'Defined accepts anything which is defined'); +ok(defined Defined({}), 'Defined accepts anything which is defined'); +ok(defined Defined(sub {}), 'Defined accepts anything which is defined'); +ok(defined Defined($SCALAR_REF), 'Defined accepts anything which is defined'); +ok(defined Defined($GLOB_REF), 'Defined accepts anything which is defined'); +ok(defined Defined($fh), 'Defined accepts anything which is defined'); +ok(defined Defined(qr/../), 'Defined accepts anything which is defined'); +ok(defined Defined(bless {}, 'Foo'), 'Defined accepts anything which is defined'); +ok(!defined Defined(undef), 'Defined accepts anything which is defined'); + +ok(!defined Undef(0), 'Undef accepts anything which is not defined'); +ok(!defined Undef(100), 'Undef accepts anything which is not defined'); +ok(!defined Undef(''), 'Undef accepts anything which is not defined'); +ok(!defined Undef('Foo'), 'Undef accepts anything which is not defined'); +ok(!defined Undef([]), 'Undef accepts anything which is not defined'); +ok(!defined Undef({}), 'Undef accepts anything which is not defined'); +ok(!defined Undef(sub {}), 'Undef accepts anything which is not defined'); +ok(!defined Undef($SCALAR_REF), 'Undef accepts anything which is not defined'); +ok(!defined Undef($GLOB_REF), 'Undef accepts anything which is not defined'); +ok(!defined Undef($fh), 'Undef accepts anything which is not defined'); +ok(!defined Undef(qr/../), 'Undef accepts anything which is not defined'); +ok(!defined Undef(bless {}, 'Foo'), 'Undef accepts anything which is not defined'); +ok(defined Undef(undef), 'Undef accepts anything which is not defined'); + +ok(defined Bool(0), 'Bool rejects anything which is not a 1 or 0 or "" or undef'); +ok(defined Bool(1), 'Bool rejects anything which is not a 1 or 0 or "" or undef'); +ok(!defined Bool(100), 'Bool rejects anything which is not a 1 or 0 or "" or undef'); +ok(defined Bool(''), 'Bool rejects anything which is not a 1 or 0 or "" or undef'); +ok(!defined Bool('Foo'), 'Bool rejects anything which is not a 1 or 0 or "" or undef'); +ok(!defined Bool([]), 'Bool rejects anything which is not a 1 or 0 or "" or undef'); +ok(!defined Bool({}), 'Bool rejects anything which is not a 1 or 0 or "" or undef'); +ok(!defined Bool(sub {}), 'Bool rejects anything which is not a 1 or 0 or "" or undef'); +ok(!defined Bool($SCALAR_REF), 'Bool rejects anything which is not a 1 or 0 or "" or undef'); +ok(!defined Bool($GLOB_REF), 'Bool rejects anything which is not a 1 or 0 or "" or undef'); +ok(!defined Bool($fh), 'Bool rejects anything which is not a 1 or 0 or "" or undef'); +ok(!defined Bool(qr/../), 'Bool rejects anything which is not a 1 or 0 or "" or undef'); +ok(!defined Bool(bless {}, 'Foo'), 'Bool rejects anything which is not a 1 or 0 or "" or undef'); +ok(defined Bool(undef), 'Bool rejects anything which is not a 1 or 0 or "" or undef'); + +ok(defined Value(0), 'Value accepts anything which is not a Ref'); +ok(defined Value(100), 'Value accepts anything which is not a Ref'); +ok(defined Value(''), 'Value accepts anything which is not a Ref'); +ok(defined Value('Foo'), 'Value accepts anything which is not a Ref'); +ok(!defined Value([]), 'Value rejects anything which is not a Value'); +ok(!defined Value({}), 'Value rejects anything which is not a Value'); +ok(!defined Value(sub {}), 'Value rejects anything which is not a Value'); +ok(!defined Value($SCALAR_REF), 'Value rejects anything which is not a Value'); +ok(!defined Value($GLOB_REF), 'Value rejects anything which is not a Value'); +ok(!defined Value($fh), 'Value rejects anything which is not a Value'); +ok(!defined Value(qr/../), 'Value rejects anything which is not a Value'); +ok(!defined Value(bless {}, 'Foo'), 'Value rejects anything which is not a Value'); +ok(!defined Value(undef), 'Value rejects anything which is not a Value'); + +ok(!defined Ref(0), 'Ref accepts anything which is not a Value'); +ok(!defined Ref(100), 'Ref accepts anything which is not a Value'); +ok(!defined Ref(''), 'Ref accepts anything which is not a Value'); +ok(!defined Ref('Foo'), 'Ref accepts anything which is not a Value'); +ok(defined Ref([]), 'Ref rejects anything which is not a Ref'); +ok(defined Ref({}), 'Ref rejects anything which is not a Ref'); +ok(defined Ref(sub {}), 'Ref rejects anything which is not a Ref'); +ok(defined Ref($SCALAR_REF), 'Ref rejects anything which is not a Ref'); +ok(defined Ref($GLOB_REF), 'Ref rejects anything which is not a Ref'); +ok(defined Ref($fh), 'Ref rejects anything which is not a Ref'); +ok(defined Ref(qr/../), 'Ref rejects anything which is not a Ref'); +ok(defined Ref(bless {}, 'Foo'), 'Ref rejects anything which is not a Ref'); +ok(!defined Ref(undef), 'Ref rejects anything which is not a Ref'); + +ok(defined Int(0), 'Int accepts anything which is an Int'); +ok(defined Int(100), 'Int accepts anything which is an Int'); +ok(!defined Int(0.5), 'Int accepts anything which is not a Int'); +ok(!defined Int(100.01), 'Int accepts anything which is not a Int'); +ok(!defined Int(''), 'Int rejects anything which is not a Int'); +ok(!defined Int('Foo'), 'Int rejects anything which is not a Int'); +ok(!defined Int([]), 'Int rejects anything which is not a Int'); +ok(!defined Int({}), 'Int rejects anything which is not a Int'); +ok(!defined Int(sub {}), 'Int rejects anything which is not a Int'); +ok(!defined Int($SCALAR_REF), 'Int rejects anything which is not a Int'); +ok(!defined Int($GLOB_REF), 'Int rejects anything which is not a Int'); +ok(!defined Int($fh), 'Int rejects anything which is not a Int'); +ok(!defined Int(qr/../), 'Int rejects anything which is not a Int'); +ok(!defined Int(bless {}, 'Foo'), 'Int rejects anything which is not a Int'); +ok(!defined Int(undef), 'Int rejects anything which is not a Int'); + +ok(defined Num(0), 'Num accepts anything which is an Num'); +ok(defined Num(100), 'Num accepts anything which is an Num'); +ok(defined Num(0.5), 'Num accepts anything which is an Num'); +ok(defined Num(100.01), 'Num accepts anything which is an Num'); +ok(!defined Num(''), 'Num rejects anything which is not a Num'); +ok(!defined Num('Foo'), 'Num rejects anything which is not a Num'); +ok(!defined Num([]), 'Num rejects anything which is not a Num'); +ok(!defined Num({}), 'Num rejects anything which is not a Num'); +ok(!defined Num(sub {}), 'Num rejects anything which is not a Num'); +ok(!defined Num($SCALAR_REF), 'Num rejects anything which is not a Num'); +ok(!defined Num($GLOB_REF), 'Num rejects anything which is not a Num'); +ok(!defined Num($fh), 'Num rejects anything which is not a Num'); +ok(!defined Num(qr/../), 'Num rejects anything which is not a Num'); +ok(!defined Num(bless {}, 'Foo'), 'Num rejects anything which is not a Num'); +ok(!defined Num(undef), 'Num rejects anything which is not a Num'); + +ok(defined Str(0), 'Str accepts anything which is a Str'); +ok(defined Str(100), 'Str accepts anything which is a Str'); +ok(defined Str(''), 'Str accepts anything which is a Str'); +ok(defined Str('Foo'), 'Str accepts anything which is a Str'); +ok(!defined Str([]), 'Str rejects anything which is not a Str'); +ok(!defined Str({}), 'Str rejects anything which is not a Str'); +ok(!defined Str(sub {}), 'Str rejects anything which is not a Str'); +ok(!defined Str($SCALAR_REF), 'Str rejects anything which is not a Str'); +ok(!defined Str($fh), 'Str rejects anything which is not a Str'); +ok(!defined Str($GLOB_REF), 'Str rejects anything which is not a Str'); +ok(!defined Str(qr/../), 'Str rejects anything which is not a Str'); +ok(!defined Str(bless {}, 'Foo'), 'Str rejects anything which is not a Str'); +ok(!defined Str(undef), 'Str rejects anything which is not a Str'); + +ok(!defined ScalarRef(0), 'ScalarRef rejects anything which is not a ScalarRef'); +ok(!defined ScalarRef(100), 'ScalarRef rejects anything which is not a ScalarRef'); +ok(!defined ScalarRef(''), 'ScalarRef rejects anything which is not a ScalarRef'); +ok(!defined ScalarRef('Foo'), 'ScalarRef rejects anything which is not a ScalarRef'); +ok(!defined ScalarRef([]), 'ScalarRef rejects anything which is not a ScalarRef'); +ok(!defined ScalarRef({}), 'ScalarRef rejects anything which is not a ScalarRef'); +ok(!defined ScalarRef(sub {}), 'ScalarRef rejects anything which is not a ScalarRef'); +ok(defined ScalarRef($SCALAR_REF), 'ScalarRef accepts anything which is a ScalarRef'); +ok(!defined ScalarRef($GLOB_REF), 'ScalarRef rejects anything which is not a ScalarRef'); +ok(!defined ScalarRef($fh), 'ScalarRef rejects anything which is not a ScalarRef'); +ok(!defined ScalarRef(qr/../), 'ScalarRef rejects anything which is not a ScalarRef'); +ok(!defined ScalarRef(bless {}, 'Foo'), 'ScalarRef rejects anything which is not a ScalarRef'); +ok(!defined ScalarRef(undef), 'ScalarRef rejects anything which is not a ScalarRef'); + +ok(!defined ArrayRef(0), 'ArrayRef rejects anything which is not a ArrayRef'); +ok(!defined ArrayRef(100), 'ArrayRef rejects anything which is not a ArrayRef'); +ok(!defined ArrayRef(''), 'ArrayRef rejects anything which is not a ArrayRef'); +ok(!defined ArrayRef('Foo'), 'ArrayRef rejects anything which is not a ArrayRef'); +ok(defined ArrayRef([]), 'ArrayRef accepts anything which is a ArrayRef'); +ok(!defined ArrayRef({}), 'ArrayRef rejects anything which is not a ArrayRef'); +ok(!defined ArrayRef(sub {}), 'ArrayRef rejects anything which is not a ArrayRef'); +ok(!defined ArrayRef($SCALAR_REF), 'ArrayRef rejects anything which is not a ArrayRef'); +ok(!defined ArrayRef($GLOB_REF), 'ArrayRef rejects anything which is not a ArrayRef'); +ok(!defined ArrayRef($fh), 'ArrayRef rejects anything which is not a ArrayRef'); +ok(!defined ArrayRef(qr/../), 'ArrayRef rejects anything which is not a ArrayRef'); +ok(!defined ArrayRef(bless {}, 'Foo'), 'ArrayRef rejects anything which is not a ArrayRef'); +ok(!defined ArrayRef(undef), 'ArrayRef rejects anything which is not a ArrayRef'); + +ok(!defined HashRef(0), 'HashRef rejects anything which is not a HashRef'); +ok(!defined HashRef(100), 'HashRef rejects anything which is not a HashRef'); +ok(!defined HashRef(''), 'HashRef rejects anything which is not a HashRef'); +ok(!defined HashRef('Foo'), 'HashRef rejects anything which is not a HashRef'); +ok(!defined HashRef([]), 'HashRef rejects anything which is not a HashRef'); +ok(defined HashRef({}), 'HashRef accepts anything which is a HashRef'); +ok(!defined HashRef(sub {}), 'HashRef rejects anything which is not a HashRef'); +ok(!defined HashRef($SCALAR_REF), 'HashRef rejects anything which is not a HashRef'); +ok(!defined HashRef($GLOB_REF), 'HashRef rejects anything which is not a HashRef'); +ok(!defined HashRef($fh), 'HashRef rejects anything which is not a HashRef'); +ok(!defined HashRef(qr/../), 'HashRef rejects anything which is not a HashRef'); +ok(!defined HashRef(bless {}, 'Foo'), 'HashRef rejects anything which is not a HashRef'); +ok(!defined HashRef(undef), 'HashRef rejects anything which is not a HashRef'); + +ok(!defined CodeRef(0), 'CodeRef rejects anything which is not a CodeRef'); +ok(!defined CodeRef(100), 'CodeRef rejects anything which is not a CodeRef'); +ok(!defined CodeRef(''), 'CodeRef rejects anything which is not a CodeRef'); +ok(!defined CodeRef('Foo'), 'CodeRef rejects anything which is not a CodeRef'); +ok(!defined CodeRef([]), 'CodeRef rejects anything which is not a CodeRef'); +ok(!defined CodeRef({}), 'CodeRef rejects anything which is not a CodeRef'); +ok(defined CodeRef(sub {}), 'CodeRef accepts anything which is a CodeRef'); +ok(!defined CodeRef($SCALAR_REF), 'CodeRef rejects anything which is not a CodeRef'); +ok(!defined CodeRef($GLOB_REF), 'CodeRef rejects anything which is not a CodeRef'); +ok(!defined CodeRef($fh), 'CodeRef rejects anything which is not a CodeRef'); +ok(!defined CodeRef(qr/../), 'CodeRef rejects anything which is not a CodeRef'); +ok(!defined CodeRef(bless {}, 'Foo'), 'CodeRef rejects anything which is not a CodeRef'); +ok(!defined CodeRef(undef), 'CodeRef rejects anything which is not a CodeRef'); + +ok(!defined RegexpRef(0), 'RegexpRef rejects anything which is not a RegexpRef'); +ok(!defined RegexpRef(100), 'RegexpRef rejects anything which is not a RegexpRef'); +ok(!defined RegexpRef(''), 'RegexpRef rejects anything which is not a RegexpRef'); +ok(!defined RegexpRef('Foo'), 'RegexpRef rejects anything which is not a RegexpRef'); +ok(!defined RegexpRef([]), 'RegexpRef rejects anything which is not a RegexpRef'); +ok(!defined RegexpRef({}), 'RegexpRef rejects anything which is not a RegexpRef'); +ok(!defined RegexpRef(sub {}), 'RegexpRef rejects anything which is not a RegexpRef'); +ok(!defined RegexpRef($SCALAR_REF), 'RegexpRef rejects anything which is not a RegexpRef'); +ok(!defined RegexpRef($GLOB_REF), 'RegexpRef rejects anything which is not a RegexpRef'); +ok(!defined RegexpRef($fh), 'RegexpRef rejects anything which is not a RegexpRef'); +ok(defined RegexpRef(qr/../), 'RegexpRef accepts anything which is a RegexpRef'); +ok(!defined RegexpRef(bless {}, 'Foo'), 'RegexpRef rejects anything which is not a RegexpRef'); +ok(!defined RegexpRef(undef), 'RegexpRef rejects anything which is not a RegexpRef'); + +ok(!defined GlobRef(0), 'GlobRef rejects anything which is not a GlobRef'); +ok(!defined GlobRef(100), 'GlobRef rejects anything which is not a GlobRef'); +ok(!defined GlobRef(''), 'GlobRef rejects anything which is not a GlobRef'); +ok(!defined GlobRef('Foo'), 'GlobRef rejects anything which is not a GlobRef'); +ok(!defined GlobRef([]), 'GlobRef rejects anything which is not a GlobRef'); +ok(!defined GlobRef({}), 'GlobRef rejects anything which is not a GlobRef'); +ok(!defined GlobRef(sub {}), 'GlobRef rejects anything which is not a GlobRef'); +ok(!defined GlobRef($SCALAR_REF), 'GlobRef rejects anything which is not a GlobRef'); +ok(defined GlobRef($GLOB_REF), 'GlobRef accepts anything which is a GlobRef'); +ok(defined GlobRef($fh), 'GlobRef accepts anything which is a GlobRef'); +ok(!defined GlobRef($fh_obj), 'GlobRef rejects anything which is not a GlobRef'); +ok(!defined GlobRef(qr/../), 'GlobRef rejects anything which is not a GlobRef'); +ok(!defined GlobRef(bless {}, 'Foo'), 'GlobRef rejects anything which is not a GlobRef'); +ok(!defined GlobRef(undef), 'GlobRef rejects anything which is not a GlobRef'); + +ok(!defined FileHandle(0), 'FileHandle rejects anything which is not a FileHandle'); +ok(!defined FileHandle(100), 'FileHandle rejects anything which is not a FileHandle'); +ok(!defined FileHandle(''), 'FileHandle rejects anything which is not a FileHandle'); +ok(!defined FileHandle('Foo'), 'FileHandle rejects anything which is not a FileHandle'); +ok(!defined FileHandle([]), 'FileHandle rejects anything which is not a FileHandle'); +ok(!defined FileHandle({}), 'FileHandle rejects anything which is not a FileHandle'); +ok(!defined FileHandle(sub {}), 'FileHandle rejects anything which is not a FileHandle'); +ok(!defined FileHandle($SCALAR_REF), 'FileHandle rejects anything which is not a FileHandle'); +ok(!defined FileHandle($GLOB_REF), 'FileHandle rejects anything which is not a FileHandle'); +ok(defined FileHandle($fh), 'FileHandle accepts anything which is a FileHandle'); +ok(defined FileHandle($fh_obj), 'FileHandle accepts anything which is a FileHandle'); +ok(!defined FileHandle(qr/../), 'FileHandle rejects anything which is not a FileHandle'); +ok(!defined FileHandle(bless {}, 'Foo'), 'FileHandle rejects anything which is not a FileHandle'); +ok(!defined FileHandle(undef), 'FileHandle rejects anything which is not a FileHandle'); + +ok(!defined Object(0), 'Object rejects anything which is not blessed'); +ok(!defined Object(100), 'Object rejects anything which is not blessed'); +ok(!defined Object(''), 'Object rejects anything which is not blessed'); +ok(!defined Object('Foo'), 'Object rejects anything which is not blessed'); +ok(!defined Object([]), 'Object rejects anything which is not blessed'); +ok(!defined Object({}), 'Object rejects anything which is not blessed'); +ok(!defined Object(sub {}), 'Object rejects anything which is not blessed'); +ok(!defined Object($SCALAR_REF), 'Object rejects anything which is not blessed'); +ok(!defined Object($GLOB_REF), 'Object rejects anything which is not blessed'); +ok(!defined Object($fh), 'Object rejects anything which is not blessed'); +ok(!defined Object(qr/../), 'Object rejects anything which is not blessed'); +ok(defined Object(bless {}, 'Foo'), 'Object accepts anything which is blessed'); +ok(!defined Object(undef), 'Object accepts anything which is blessed'); + +ok(!defined ClassName(0), 'ClassName rejects anything which is not a ClassName'); +ok(!defined ClassName(100), 'ClassName rejects anything which is not a ClassName'); +ok(!defined ClassName(''), 'ClassName rejects anything which is not a ClassName'); +ok(!defined ClassName('Baz'), 'ClassName rejects anything which is not a ClassName'); { package Quux::Wibble; # this makes Quux symbol table exist @@ -294,24 +294,24 @@ ok(!defined ClassName('Baz'), '... ClassName rejects anything which is sub foo {} } -ok(!defined ClassName('Quux'), '... ClassName rejects anything which is not a ClassName'); -ok(!defined ClassName([]), '... ClassName rejects anything which is not a ClassName'); -ok(!defined ClassName({}), '... ClassName rejects anything which is not a ClassName'); -ok(!defined ClassName(sub {}), '... ClassName rejects anything which is not a ClassName'); -ok(!defined ClassName($SCALAR_REF), '... ClassName rejects anything which is not a ClassName'); -ok(!defined ClassName($fh), '... ClassName rejects anything which is not a ClassName'); -ok(!defined ClassName($GLOB_REF), '... ClassName rejects anything which is not a ClassName'); -ok(!defined ClassName(qr/../), '... ClassName rejects anything which is not a ClassName'); -ok(!defined ClassName(bless {}, 'Foo'), '... ClassName rejects anything which is not a ClassName'); -ok(!defined ClassName(undef), '... ClassName rejects anything which is not a ClassName'); -ok(defined ClassName('UNIVERSAL'), '... ClassName accepts anything which is a ClassName'); -ok(defined ClassName('Quux::Wibble'), '... ClassName accepts anything which is a ClassName'); -ok(defined ClassName('Moose::Meta::TypeConstraint'), '... ClassName accepts anything which is a ClassName'); - -ok(!defined RoleName(0), '... RoleName rejects anything which is not a RoleName'); -ok(!defined RoleName(100), '... RoleName rejects anything which is not a RoleName'); -ok(!defined RoleName(''), '... RoleName rejects anything which is not a RoleName'); -ok(!defined RoleName('Baz'), '... RoleName rejects anything which is not a RoleName'); +ok(!defined ClassName('Quux'), 'ClassName rejects anything which is not a ClassName'); +ok(!defined ClassName([]), 'ClassName rejects anything which is not a ClassName'); +ok(!defined ClassName({}), 'ClassName rejects anything which is not a ClassName'); +ok(!defined ClassName(sub {}), 'ClassName rejects anything which is not a ClassName'); +ok(!defined ClassName($SCALAR_REF), 'ClassName rejects anything which is not a ClassName'); +ok(!defined ClassName($fh), 'ClassName rejects anything which is not a ClassName'); +ok(!defined ClassName($GLOB_REF), 'ClassName rejects anything which is not a ClassName'); +ok(!defined ClassName(qr/../), 'ClassName rejects anything which is not a ClassName'); +ok(!defined ClassName(bless {}, 'Foo'), 'ClassName rejects anything which is not a ClassName'); +ok(!defined ClassName(undef), 'ClassName rejects anything which is not a ClassName'); +ok(defined ClassName('UNIVERSAL'), 'ClassName accepts anything which is a ClassName'); +ok(defined ClassName('Quux::Wibble'), 'ClassName accepts anything which is a ClassName'); +ok(defined ClassName('Moose::Meta::TypeConstraint'), 'ClassName accepts anything which is a ClassName'); + +ok(!defined RoleName(0), 'RoleName rejects anything which is not a RoleName'); +ok(!defined RoleName(100), 'RoleName rejects anything which is not a RoleName'); +ok(!defined RoleName(''), 'RoleName rejects anything which is not a RoleName'); +ok(!defined RoleName('Baz'), 'RoleName rejects anything which is not a RoleName'); { package Quux::Wibble::Role; # this makes Quux symbol table exist @@ -319,19 +319,19 @@ ok(!defined RoleName('Baz'), '... RoleName rejects anything which is n sub foo {} } -ok(!defined RoleName('Quux'), '... RoleName rejects anything which is not a RoleName'); -ok(!defined RoleName([]), '... Rolename rejects anything which is not a RoleName'); -ok(!defined RoleName({}), '... Rolename rejects anything which is not a RoleName'); -ok(!defined RoleName(sub {}), '... Rolename rejects anything which is not a RoleName'); -ok(!defined RoleName($SCALAR_REF), '... Rolename rejects anything which is not a RoleName'); -ok(!defined RoleName($fh), '... Rolename rejects anything which is not a RoleName'); -ok(!defined RoleName($GLOB_REF), '... Rolename rejects anything which is not a RoleName'); -ok(!defined RoleName(qr/../), '... Rolename rejects anything which is not a RoleName'); -ok(!defined RoleName(bless {}, 'Foo'), '... Rolename rejects anything which is not a RoleName'); -ok(!defined RoleName(undef), '... Rolename rejects anything which is not a RoleName'); -ok(!defined RoleName('UNIVERSAL'), '... Rolename rejects anything which is not a RoleName'); -ok(!defined RoleName('Quux::Wibble'), '... Rolename rejects anything which is not a RoleName'); -ok(!defined RoleName('Moose::Meta::TypeConstraint'), '... RoleName accepts anything which is a RoleName'); -ok(defined RoleName('Quux::Wibble::Role'), '... RoleName accepts anything which is a RoleName'); +ok(!defined RoleName('Quux'), 'RoleName rejects anything which is not a RoleName'); +ok(!defined RoleName([]), 'Rolename rejects anything which is not a RoleName'); +ok(!defined RoleName({}), 'Rolename rejects anything which is not a RoleName'); +ok(!defined RoleName(sub {}), 'Rolename rejects anything which is not a RoleName'); +ok(!defined RoleName($SCALAR_REF), 'Rolename rejects anything which is not a RoleName'); +ok(!defined RoleName($fh), 'Rolename rejects anything which is not a RoleName'); +ok(!defined RoleName($GLOB_REF), 'Rolename rejects anything which is not a RoleName'); +ok(!defined RoleName(qr/../), 'Rolename rejects anything which is not a RoleName'); +ok(!defined RoleName(bless {}, 'Foo'), 'Rolename rejects anything which is not a RoleName'); +ok(!defined RoleName(undef), 'Rolename rejects anything which is not a RoleName'); +ok(!defined RoleName('UNIVERSAL'), 'Rolename rejects anything which is not a RoleName'); +ok(!defined RoleName('Quux::Wibble'), 'Rolename rejects anything which is not a RoleName'); +ok(!defined RoleName('Moose::Meta::TypeConstraint'), 'RoleName accepts anything which is a RoleName'); +ok(defined RoleName('Quux::Wibble::Role'), 'RoleName accepts anything which is a RoleName'); close($fh) || die "Could not close the filehandle $0 for test"; diff --git a/t/040_type_constraints/004_util_find_type_constraint.t b/t/040_type_constraints/004_util_find_type_constraint.t index 8fe6a6b..390cf76 100644 --- a/t/040_type_constraints/004_util_find_type_constraint.t +++ b/t/040_type_constraints/004_util_find_type_constraint.t @@ -31,7 +31,7 @@ foreach my $type_name (qw( )) { is(find_type_constraint($type_name)->name, $type_name, - '... got the right name for ' . $type_name); + 'got the right name for ' . $type_name); } # TODO: diff --git a/t/040_type_constraints/005_util_type_coercion.t b/t/040_type_constraints/005_util_type_coercion.t index 86a158c..33a9bfe 100644 --- a/t/040_type_constraints/005_util_type_coercion.t +++ b/t/040_type_constraints/005_util_type_coercion.t @@ -34,9 +34,9 @@ Moose::Util::TypeConstraints->export_type_constraints_as_functions(); my $header = HTTPHeader->new(); isa_ok($header, 'HTTPHeader'); -ok(Header($header), '... this passed the type test'); -ok(!Header([]), '... this did not pass the type test'); -ok(!Header({}), '... this did not pass the type test'); +ok(Header($header), 'this passed the type test'); +ok(!Header([]), 'this did not pass the type test'); +ok(!Header({}), 'this did not pass the type test'); my $anon_type = subtype Object => where { $_->isa('HTTPHeader') }; @@ -62,8 +62,8 @@ foreach my $coercion ( is_deeply( $coerced->array(), [ 1, 2, 3 ], - '... got the right array'); - is($coerced->hash(), undef, '... nothing assigned to the hash'); + 'got the right array'); + is($coerced->hash(), undef, 'nothing assigned to the hash'); } { @@ -73,19 +73,19 @@ foreach my $coercion ( is_deeply( $coerced->hash(), { one => 1, two => 2, three => 3 }, - '... got the right hash'); - is($coerced->array(), undef, '... nothing assigned to the array'); + 'got the right hash'); + is($coerced->array(), undef, 'nothing assigned to the array'); } { my $scalar_ref = \(my $var); my $coerced = $coercion->coerce($scalar_ref); - is($coerced, $scalar_ref, '... got back what we put in'); + is($coerced, $scalar_ref, 'got back what we put in'); } { my $coerced = $coercion->coerce("Foo"); - is($coerced, "Foo", '... got back what we put in'); + is($coerced, "Foo", 'got back what we put in'); } } diff --git a/t/040_type_constraints/006_util_type_reloading.t b/t/040_type_constraints/006_util_type_reloading.t index 4cde153..e77d2f3 100644 --- a/t/040_type_constraints/006_util_type_reloading.t +++ b/t/040_type_constraints/006_util_type_reloading.t @@ -13,17 +13,17 @@ use Test::Exception; $SIG{__WARN__} = sub { 0 }; eval { require Foo; }; -ok(!$@, '... loaded Foo successfully') || diag $@; +ok(!$@, 'loaded Foo successfully') || diag $@; delete $INC{'Foo.pm'}; eval { require Foo; }; -ok(!$@, '... re-loaded Foo successfully') || diag $@; +ok(!$@, 're-loaded Foo successfully') || diag $@; eval { require Bar; }; -ok(!$@, '... loaded Bar successfully') || diag $@; +ok(!$@, 'loaded Bar successfully') || diag $@; delete $INC{'Bar.pm'}; eval { require Bar; }; -ok(!$@, '... re-loaded Bar successfully') || diag $@; \ No newline at end of file +ok(!$@, 're-loaded Bar successfully') || diag $@; \ No newline at end of file diff --git a/t/040_type_constraints/007_util_more_type_coercion.t b/t/040_type_constraints/007_util_more_type_coercion.t index cd29ea0..4ee9495 100644 --- a/t/040_type_constraints/007_util_more_type_coercion.t +++ b/t/040_type_constraints/007_util_more_type_coercion.t @@ -40,35 +40,35 @@ use Test::Exception; lives_ok { $engine->header([ 1, 2, 3 ]); - } '... type was coerced without incident'; + } 'type was coerced without incident'; isa_ok($engine->header, 'HTTPHeader'); is_deeply( $engine->header->array, [ 1, 2, 3 ], - '... got the right array value of the header'); - ok(!defined($engine->header->hash), '... no hash value set'); + 'got the right array value of the header'); + ok(!defined($engine->header->hash), 'no hash value set'); # try with hash lives_ok { $engine->header({ one => 1, two => 2, three => 3 }); - } '... type was coerced without incident'; + } 'type was coerced without incident'; isa_ok($engine->header, 'HTTPHeader'); is_deeply( $engine->header->hash, { one => 1, two => 2, three => 3 }, - '... got the right hash value of the header'); - ok(!defined($engine->header->array), '... no array value set'); + 'got the right hash value of the header'); + ok(!defined($engine->header->array), 'no array value set'); dies_ok { $engine->header("Foo"); - } '... dies with the wrong type, even after coercion'; + } 'dies with the wrong type, even after coercion'; lives_ok { $engine->header(HTTPHeader->new); - } '... lives with the right type, even after coercion'; + } 'lives with the right type, even after coercion'; } { @@ -80,8 +80,8 @@ use Test::Exception; is_deeply( $engine->header->array, [ 1, 2, 3 ], - '... got the right array value of the header'); - ok(!defined($engine->header->hash), '... no hash value set'); + 'got the right array value of the header'); + ok(!defined($engine->header->hash), 'no hash value set'); } { @@ -93,8 +93,8 @@ use Test::Exception; is_deeply( $engine->header->hash, { one => 1, two => 2, three => 3 }, - '... got the right hash value of the header'); - ok(!defined($engine->header->array), '... no array value set'); + 'got the right hash value of the header'); + ok(!defined($engine->header->array), 'no array value set'); } { @@ -103,15 +103,15 @@ use Test::Exception; isa_ok($engine->header, 'HTTPHeader'); - ok(!defined($engine->header->hash), '... no hash value set'); - ok(!defined($engine->header->array), '... no array value set'); + ok(!defined($engine->header->hash), 'no hash value set'); + ok(!defined($engine->header->array), 'no array value set'); } dies_ok { Engine->new(header => 'Foo'); -} '... dies correctly with bad params'; +} 'dies correctly with bad params'; dies_ok { Engine->new(header => \(my $var)); -} '... dies correctly with bad params'; +} 'dies correctly with bad params'; diff --git a/t/040_type_constraints/008_union_types.t b/t/040_type_constraints/008_union_types.t index e192b20..b749ca1 100644 --- a/t/040_type_constraints/008_union_types.t +++ b/t/040_type_constraints/008_union_types.t @@ -16,16 +16,16 @@ isa_ok($Str, 'Moose::Meta::TypeConstraint'); my $Undef = find_type_constraint('Undef'); isa_ok($Undef, 'Moose::Meta::TypeConstraint'); -ok(!$Str->check(undef), '... Str cannot accept an Undef value'); -ok($Str->check('String'), '... Str can accept an String value'); -ok(!$Undef->check('String'), '... Undef cannot accept an Str value'); -ok($Undef->check(undef), '... Undef can accept an Undef value'); +ok(!$Str->check(undef), 'Str cannot accept an Undef value'); +ok($Str->check('String'), 'Str can accept an String value'); +ok(!$Undef->check('String'), 'Undef cannot accept an Str value'); +ok($Undef->check(undef), 'Undef can accept an Undef value'); my $Str_or_Undef = Moose::Meta::TypeConstraint::Union->new(type_constraints => [$Str, $Undef]); isa_ok($Str_or_Undef, 'Moose::Meta::TypeConstraint::Union'); -ok($Str_or_Undef->check(undef), '... (Str | Undef) can accept an Undef value'); -ok($Str_or_Undef->check('String'), '... (Str | Undef) can accept a String value'); +ok($Str_or_Undef->check(undef), '(Str | Undef) can accept an Undef value'); +ok($Str_or_Undef->check('String'), '(Str | Undef) can accept a String value'); ok($Str_or_Undef->is_a_type_of($Str), "subtype of Str"); ok($Str_or_Undef->is_a_type_of($Undef), "subtype of Undef"); @@ -46,35 +46,35 @@ isa_ok($ArrayRef, 'Moose::Meta::TypeConstraint'); my $HashRef = find_type_constraint('HashRef'); isa_ok($HashRef, 'Moose::Meta::TypeConstraint'); -ok($ArrayRef->check([]), '... ArrayRef can accept an [] value'); -ok(!$ArrayRef->check({}), '... ArrayRef cannot accept an {} value'); -ok($HashRef->check({}), '... HashRef can accept an {} value'); -ok(!$HashRef->check([]), '... HashRef cannot accept an [] value'); +ok($ArrayRef->check([]), 'ArrayRef can accept an [] value'); +ok(!$ArrayRef->check({}), 'ArrayRef cannot accept an {} value'); +ok($HashRef->check({}), 'HashRef can accept an {} value'); +ok(!$HashRef->check([]), 'HashRef cannot accept an [] value'); my $HashOrArray = Moose::Meta::TypeConstraint::Union->new(type_constraints => [$ArrayRef, $HashRef]); isa_ok($HashOrArray, 'Moose::Meta::TypeConstraint::Union'); -ok($HashOrArray->check([]), '... (ArrayRef | HashRef) can accept []'); -ok($HashOrArray->check({}), '... (ArrayRef | HashRef) can accept {}'); +ok($HashOrArray->check([]), '(ArrayRef | HashRef) can accept []'); +ok($HashOrArray->check({}), '(ArrayRef | HashRef) can accept {}'); -ok(!$HashOrArray->check(\(my $var1)), '... (ArrayRef | HashRef) cannot accept scalar refs'); -ok(!$HashOrArray->check(sub {}), '... (ArrayRef | HashRef) cannot accept code refs'); -ok(!$HashOrArray->check(50), '... (ArrayRef | HashRef) cannot accept Numbers'); +ok(!$HashOrArray->check(\(my $var1)), '(ArrayRef | HashRef) cannot accept scalar refs'); +ok(!$HashOrArray->check(sub {}), '(ArrayRef | HashRef) cannot accept code refs'); +ok(!$HashOrArray->check(50), '(ArrayRef | HashRef) cannot accept Numbers'); diag $HashOrArray->validate([]); -ok(!defined($HashOrArray->validate([])), '... (ArrayRef | HashRef) can accept []'); -ok(!defined($HashOrArray->validate({})), '... (ArrayRef | HashRef) can accept {}'); +ok(!defined($HashOrArray->validate([])), '(ArrayRef | HashRef) can accept []'); +ok(!defined($HashOrArray->validate({})), '(ArrayRef | HashRef) can accept {}'); like($HashOrArray->validate(\(my $var2)), qr/Validation failed for \'ArrayRef\' failed with value SCALAR\(0x.+?\) and Validation failed for \'HashRef\' failed with value SCALAR\(0x.+?\) in \(ArrayRef\|HashRef\)/, -'... (ArrayRef | HashRef) cannot accept scalar refs'); +'(ArrayRef | HashRef) cannot accept scalar refs'); like($HashOrArray->validate(sub {}), qr/Validation failed for \'ArrayRef\' failed with value CODE\(0x.+?\) and Validation failed for \'HashRef\' failed with value CODE\(0x.+?\) in \(ArrayRef\|HashRef\)/, -'... (ArrayRef | HashRef) cannot accept code refs'); +'(ArrayRef | HashRef) cannot accept code refs'); is($HashOrArray->validate(50), 'Validation failed for \'ArrayRef\' failed with value 50 and Validation failed for \'HashRef\' failed with value 50 in (ArrayRef|HashRef)', -'... (ArrayRef | HashRef) cannot accept Numbers'); +'(ArrayRef | HashRef) cannot accept Numbers'); diff --git a/t/040_type_constraints/009_union_types_and_coercions.t b/t/040_type_constraints/009_union_types_and_coercions.t index 20690d9..afe1532 100644 --- a/t/040_type_constraints/009_union_types_and_coercions.t +++ b/t/040_type_constraints/009_union_types_and_coercions.t @@ -71,68 +71,68 @@ BEGIN { isa_ok($email->raw_body, 'IO::String'); - is($email->as_string, undef, '... got correct empty string'); + is($email->as_string, undef, 'got correct empty string'); } { - my $email = Email::Moose->new(raw_body => '... this is my body ...'); + my $email = Email::Moose->new(raw_body => 'this is my body ...'); isa_ok($email, 'Email::Moose'); isa_ok($email->raw_body, 'IO::String'); - is($email->as_string, '... this is my body ...', '... got correct string'); + is($email->as_string, 'this is my body ...', 'got correct string'); lives_ok { - $email->raw_body('... this is the next body ...'); - } '... this will coerce correctly'; + $email->raw_body('this is the next body ...'); + } 'this will coerce correctly'; isa_ok($email->raw_body, 'IO::String'); - is($email->as_string, '... this is the next body ...', '... got correct string'); + is($email->as_string, 'this is the next body ...', 'got correct string'); } { - my $str = '... this is my body (ref) ...'; + my $str = 'this is my body (ref) ...'; my $email = Email::Moose->new(raw_body => \$str); isa_ok($email, 'Email::Moose'); isa_ok($email->raw_body, 'IO::String'); - is($email->as_string, $str, '... got correct string'); + is($email->as_string, $str, 'got correct string'); - my $str2 = '... this is the next body (ref) ...'; + my $str2 = 'this is the next body (ref) ...'; lives_ok { $email->raw_body(\$str2); - } '... this will coerce correctly'; + } 'this will coerce correctly'; isa_ok($email->raw_body, 'IO::String'); - is($email->as_string, $str2, '... got correct string'); + is($email->as_string, $str2, 'got correct string'); } { - my $io_str = IO::String->new('... this is my body (IO::String) ...'); + my $io_str = IO::String->new('this is my body (IO::String) ...'); my $email = Email::Moose->new(raw_body => $io_str); isa_ok($email, 'Email::Moose'); isa_ok($email->raw_body, 'IO::String'); - is($email->raw_body, $io_str, '... and it is the one we expected'); + is($email->raw_body, $io_str, 'and it is the one we expected'); - is($email->as_string, '... this is my body (IO::String) ...', '... got correct string'); + is($email->as_string, 'this is my body (IO::String) ...', 'got correct string'); - my $io_str2 = IO::String->new('... this is the next body (IO::String) ...'); + my $io_str2 = IO::String->new('this is the next body (IO::String) ...'); lives_ok { $email->raw_body($io_str2); - } '... this will coerce correctly'; + } 'this will coerce correctly'; isa_ok($email->raw_body, 'IO::String'); - is($email->raw_body, $io_str2, '... and it is the one we expected'); + is($email->raw_body, $io_str2, 'and it is the one we expected'); - is($email->as_string, '... this is the next body (IO::String) ...', '... got correct string'); + is($email->as_string, 'this is the next body (IO::String) ...', 'got correct string'); } { @@ -155,7 +155,7 @@ BEGIN { isa_ok($email, 'Email::Moose'); isa_ok($email->raw_body, 'IO::File'); - is($email->raw_body, $fh, '... and it is the one we expected'); + is($email->raw_body, $fh, 'and it is the one we expected'); } diff --git a/t/040_type_constraints/010_misc_type_tests.t b/t/040_type_constraints/010_misc_type_tests.t index 2cf0985..3e134c7 100644 --- a/t/040_type_constraints/010_misc_type_tests.t +++ b/t/040_type_constraints/010_misc_type_tests.t @@ -14,7 +14,7 @@ BEGIN { lives_ok { subtype 'Numb3rs' => as 'Num'; -} '... create bare subtype fine'; +} 'create bare subtype fine'; my $numb3rs = find_type_constraint('Numb3rs'); isa_ok($numb3rs, 'Moose::Meta::TypeConstraint'); diff --git a/t/040_type_constraints/011_container_type_constraint.t b/t/040_type_constraints/011_container_type_constraint.t index c27d4b8..c6c9e1b 100644 --- a/t/040_type_constraints/011_container_type_constraint.t +++ b/t/040_type_constraints/011_container_type_constraint.t @@ -21,13 +21,13 @@ my $array_of_ints = Moose::Meta::TypeConstraint::Parameterized->new( isa_ok($array_of_ints, 'Moose::Meta::TypeConstraint::Parameterized'); isa_ok($array_of_ints, 'Moose::Meta::TypeConstraint'); -ok($array_of_ints->check([ 1, 2, 3, 4 ]), '... [ 1, 2, 3, 4 ] passed successfully'); -ok(!$array_of_ints->check([qw/foo bar baz/]), '... [qw/foo bar baz/] failed successfully'); -ok(!$array_of_ints->check([ 1, 2, 3, qw/foo bar/]), '... [ 1, 2, 3, qw/foo bar/] failed successfully'); +ok($array_of_ints->check([ 1, 2, 3, 4 ]), '[ 1, 2, 3, 4 ] passed successfully'); +ok(!$array_of_ints->check([qw/foo bar baz/]), '[qw/foo bar baz/] failed successfully'); +ok(!$array_of_ints->check([ 1, 2, 3, qw/foo bar/]), '[ 1, 2, 3, qw/foo bar/] failed successfully'); -ok(!$array_of_ints->check(1), '... 1 failed successfully'); -ok(!$array_of_ints->check({}), '... {} failed successfully'); -ok(!$array_of_ints->check(sub { () }), '... sub { () } failed successfully'); +ok(!$array_of_ints->check(1), '1 failed successfully'); +ok(!$array_of_ints->check({}), '{} failed successfully'); +ok(!$array_of_ints->check(sub { () }), 'sub { () } failed successfully'); # Hash of Ints @@ -39,13 +39,13 @@ my $hash_of_ints = Moose::Meta::TypeConstraint::Parameterized->new( isa_ok($hash_of_ints, 'Moose::Meta::TypeConstraint::Parameterized'); isa_ok($hash_of_ints, 'Moose::Meta::TypeConstraint'); -ok($hash_of_ints->check({ one => 1, two => 2, three => 3 }), '... { one => 1, two => 2, three => 3 } passed successfully'); -ok(!$hash_of_ints->check({ 1 => 'one', 2 => 'two', 3 => 'three' }), '... { 1 => one, 2 => two, 3 => three } failed successfully'); -ok(!$hash_of_ints->check({ 1 => 'one', 2 => 'two', three => 3 }), '... { 1 => one, 2 => two, three => 3 } failed successfully'); +ok($hash_of_ints->check({ one => 1, two => 2, three => 3 }), '{ one => 1, two => 2, three => 3 } passed successfully'); +ok(!$hash_of_ints->check({ 1 => 'one', 2 => 'two', 3 => 'three' }), '{ 1 => one, 2 => two, 3 => three } failed successfully'); +ok(!$hash_of_ints->check({ 1 => 'one', 2 => 'two', three => 3 }), '{ 1 => one, 2 => two, three => 3 } failed successfully'); -ok(!$hash_of_ints->check(1), '... 1 failed successfully'); -ok(!$hash_of_ints->check([]), '... [] failed successfully'); -ok(!$hash_of_ints->check(sub { () }), '... sub { () } failed successfully'); +ok(!$hash_of_ints->check(1), '1 failed successfully'); +ok(!$hash_of_ints->check([]), '[] failed successfully'); +ok(!$hash_of_ints->check(sub { () }), 'sub { () } failed successfully'); # Array of Array of Ints @@ -59,10 +59,10 @@ isa_ok($array_of_array_of_ints, 'Moose::Meta::TypeConstraint'); ok($array_of_array_of_ints->check( [[ 1, 2, 3 ], [ 4, 5, 6 ]] -), '... [[ 1, 2, 3 ], [ 4, 5, 6 ]] passed successfully'); +), '[[ 1, 2, 3 ], [ 4, 5, 6 ]] passed successfully'); ok(!$array_of_array_of_ints->check( [[ 1, 2, 3 ], [ qw/foo bar/ ]] -), '... [[ 1, 2, 3 ], [ qw/foo bar/ ]] failed successfully'); +), '[[ 1, 2, 3 ], [ qw/foo bar/ ]] failed successfully'); { my $anon_type = Moose::Util::TypeConstraints::find_or_parse_type_constraint('ArrayRef[Foo]'); diff --git a/t/040_type_constraints/012_container_type_coercion.t b/t/040_type_constraints/012_container_type_coercion.t index f6237e8..fc194ef 100644 --- a/t/040_type_constraints/012_container_type_coercion.t +++ b/t/040_type_constraints/012_container_type_coercion.t @@ -25,7 +25,7 @@ isa_ok($array_of_ints, 'Moose::Meta::TypeConstraint'); $r->add_type_constraint($array_of_ints); -is(find_type_constraint('ArrayRef[Int]'), $array_of_ints, '... found the type we just added'); +is(find_type_constraint('ArrayRef[Int]'), $array_of_ints, 'found the type we just added'); # Hash of Ints @@ -39,7 +39,7 @@ isa_ok($hash_of_ints, 'Moose::Meta::TypeConstraint'); $r->add_type_constraint($hash_of_ints); -is(find_type_constraint('HashRef[Int]'), $hash_of_ints, '... found the type we just added'); +is(find_type_constraint('HashRef[Int]'), $hash_of_ints, 'found the type we just added'); ## now attempt a coercion @@ -63,6 +63,6 @@ is(find_type_constraint('HashRef[Int]'), $hash_of_ints, '... found the type we j my $foo = Foo->new(bar => { one => 1, two => 2, three => 3 }); isa_ok($foo, 'Foo'); -is_deeply([ sort @{$foo->bar} ], [ 1, 2, 3 ], '... our coercion worked!'); +is_deeply([ sort @{$foo->bar} ], [ 1, 2, 3 ], 'our coercion worked!'); diff --git a/t/040_type_constraints/013_advanced_type_creation.t b/t/040_type_constraints/013_advanced_type_creation.t index 0a40a9f..b3b3093 100644 --- a/t/040_type_constraints/013_advanced_type_creation.t +++ b/t/040_type_constraints/013_advanced_type_creation.t @@ -20,11 +20,11 @@ my $r = Moose::Util::TypeConstraints->get_type_constraint_registry; my $array_of_ints_or_strings = Moose::Util::TypeConstraints::create_parameterized_type_constraint('ArrayRef[Int|Str]'); isa_ok($array_of_ints_or_strings, 'Moose::Meta::TypeConstraint::Parameterized'); -ok($array_of_ints_or_strings->check([ 1, 'two', 3 ]), '... this passed the type check'); -ok($array_of_ints_or_strings->check([ 1, 2, 3 ]), '... this passed the type check'); -ok($array_of_ints_or_strings->check([ 'one', 'two', 'three' ]), '... this passed the type check'); +ok($array_of_ints_or_strings->check([ 1, 'two', 3 ]), 'this passed the type check'); +ok($array_of_ints_or_strings->check([ 1, 2, 3 ]), 'this passed the type check'); +ok($array_of_ints_or_strings->check([ 'one', 'two', 'three' ]), 'this passed the type check'); -ok(!$array_of_ints_or_strings->check([ 1, [], 'three' ]), '... this didnt pass the type check'); +ok(!$array_of_ints_or_strings->check([ 1, [], 'three' ]), 'this didnt pass the type check'); $r->add_type_constraint($array_of_ints_or_strings); @@ -33,11 +33,11 @@ $r->add_type_constraint($array_of_ints_or_strings); my $array_of_ints_or_hash_ref = Moose::Util::TypeConstraints::create_parameterized_type_constraint('ArrayRef[Int | HashRef]'); isa_ok($array_of_ints_or_hash_ref, 'Moose::Meta::TypeConstraint::Parameterized'); -ok($array_of_ints_or_hash_ref->check([ 1, {}, 3 ]), '... this passed the type check'); -ok($array_of_ints_or_hash_ref->check([ 1, 2, 3 ]), '... this passed the type check'); -ok($array_of_ints_or_hash_ref->check([ {}, {}, {} ]), '... this passed the type check'); +ok($array_of_ints_or_hash_ref->check([ 1, {}, 3 ]), 'this passed the type check'); +ok($array_of_ints_or_hash_ref->check([ 1, 2, 3 ]), 'this passed the type check'); +ok($array_of_ints_or_hash_ref->check([ {}, {}, {} ]), 'this passed the type check'); -ok(!$array_of_ints_or_hash_ref->check([ {}, [], 3 ]), '... this didnt pass the type check'); +ok(!$array_of_ints_or_hash_ref->check([ {}, [], 3 ]), 'this didnt pass the type check'); $r->add_type_constraint($array_of_ints_or_hash_ref); @@ -49,11 +49,11 @@ $r->add_type_constraint($array_of_ints_or_hash_ref); my $pure_insanity = Moose::Util::TypeConstraints::create_type_constraint_union('ArrayRef[Int|Str] | ArrayRef[Int | HashRef]'); isa_ok($pure_insanity, 'Moose::Meta::TypeConstraint::Union'); -ok($pure_insanity->check([ 1, {}, 3 ]), '... this passed the type check'); -ok($pure_insanity->check([ 1, 'Str', 3 ]), '... this passed the type check'); +ok($pure_insanity->check([ 1, {}, 3 ]), 'this passed the type check'); +ok($pure_insanity->check([ 1, 'Str', 3 ]), 'this passed the type check'); -ok(!$pure_insanity->check([ 1, {}, 'foo' ]), '... this didnt pass the type check'); -ok(!$pure_insanity->check([ [], {}, 1 ]), '... this didnt pass the type check'); +ok(!$pure_insanity->check([ 1, {}, 'foo' ]), 'this didnt pass the type check'); +ok(!$pure_insanity->check([ [], {}, 1 ]), 'this didnt pass the type check'); ## Nested Containers ... @@ -63,13 +63,13 @@ my $array_of_ints = Moose::Util::TypeConstraints::create_parameterized_type_cons isa_ok($array_of_ints, 'Moose::Meta::TypeConstraint::Parameterized'); isa_ok($array_of_ints, 'Moose::Meta::TypeConstraint'); -ok($array_of_ints->check([ 1, 2, 3, 4 ]), '... [ 1, 2, 3, 4 ] passed successfully'); -ok(!$array_of_ints->check([qw/foo bar baz/]), '... [qw/foo bar baz/] failed successfully'); -ok(!$array_of_ints->check([ 1, 2, 3, qw/foo bar/]), '... [ 1, 2, 3, qw/foo bar/] failed successfully'); +ok($array_of_ints->check([ 1, 2, 3, 4 ]), '[ 1, 2, 3, 4 ] passed successfully'); +ok(!$array_of_ints->check([qw/foo bar baz/]), '[qw/foo bar baz/] failed successfully'); +ok(!$array_of_ints->check([ 1, 2, 3, qw/foo bar/]), '[ 1, 2, 3, qw/foo bar/] failed successfully'); -ok(!$array_of_ints->check(1), '... 1 failed successfully'); -ok(!$array_of_ints->check({}), '... {} failed successfully'); -ok(!$array_of_ints->check(sub { () }), '... sub { () } failed successfully'); +ok(!$array_of_ints->check(1), '1 failed successfully'); +ok(!$array_of_ints->check({}), '{} failed successfully'); +ok(!$array_of_ints->check(sub { () }), 'sub { () } failed successfully'); # Array of Array of Ints @@ -79,10 +79,10 @@ isa_ok($array_of_array_of_ints, 'Moose::Meta::TypeConstraint'); ok($array_of_array_of_ints->check( [[ 1, 2, 3 ], [ 4, 5, 6 ]] -), '... [[ 1, 2, 3 ], [ 4, 5, 6 ]] passed successfully'); +), '[[ 1, 2, 3 ], [ 4, 5, 6 ]] passed successfully'); ok(!$array_of_array_of_ints->check( [[ 1, 2, 3 ], [ qw/foo bar/ ]] -), '... [[ 1, 2, 3 ], [ qw/foo bar/ ]] failed successfully'); +), '[[ 1, 2, 3 ], [ qw/foo bar/ ]] failed successfully'); # Array of Array of Array of Ints @@ -92,10 +92,10 @@ isa_ok($array_of_array_of_array_of_ints, 'Moose::Meta::TypeConstraint'); ok($array_of_array_of_array_of_ints->check( [[[ 1, 2, 3 ], [ 4, 5, 6 ]], [[ 7, 8, 9 ]]] -), '... [[[ 1, 2, 3 ], [ 4, 5, 6 ]], [[ 7, 8, 9 ]]] passed successfully'); +), '[[[ 1, 2, 3 ], [ 4, 5, 6 ]], [[ 7, 8, 9 ]]] passed successfully'); ok(!$array_of_array_of_array_of_ints->check( [[[ 1, 2, 3 ]], [[ qw/foo bar/ ]]] -), '... [[[ 1, 2, 3 ]], [[ qw/foo bar/ ]]] failed successfully'); +), '[[[ 1, 2, 3 ]], [[ qw/foo bar/ ]]] failed successfully'); diff --git a/t/040_type_constraints/014_type_notation_parser.t b/t/040_type_constraints/014_type_notation_parser.t index bf48b5f..e2864b2 100644 --- a/t/040_type_constraints/014_type_notation_parser.t +++ b/t/040_type_constraints/014_type_notation_parser.t @@ -19,7 +19,7 @@ Volunteers welcome :) ## check the containers ok(Moose::Util::TypeConstraints::_detect_parameterized_type_constraint($_), - '... this correctly detected a container (' . $_ . ')') + 'this correctly detected a container (' . $_ . ')') for ( 'ArrayRef[Foo]', 'ArrayRef[Foo | Int]', @@ -29,7 +29,7 @@ ok(Moose::Util::TypeConstraints::_detect_parameterized_type_constraint($_), ); ok(!Moose::Util::TypeConstraints::_detect_parameterized_type_constraint($_), - '... this correctly detected a non-container (' . $_ . ')') + 'this correctly detected a non-container (' . $_ . ')') for ( 'ArrayRef[]', 'ArrayRef[Foo]Bar', @@ -50,14 +50,14 @@ ok(!Moose::Util::TypeConstraints::_detect_parameterized_type_constraint($_), is_deeply( [ Moose::Util::TypeConstraints::_parse_parameterized_type_constraint($_) ], $split_tests{$_}, - '... this correctly split the container (' . $_ . ')' + 'this correctly split the container (' . $_ . ')' ) for keys %split_tests; } ## now for the unions ok(Moose::Util::TypeConstraints::_detect_type_constraint_union($_), - '... this correctly detected union (' . $_ . ')') + 'this correctly detected union (' . $_ . ')') for ( 'Int | Str', 'Int|Str', @@ -74,7 +74,7 @@ ok(Moose::Util::TypeConstraints::_detect_type_constraint_union($_), ); ok(!Moose::Util::TypeConstraints::_detect_type_constraint_union($_), - '... this correctly detected a non-union (' . $_ . ')') + 'this correctly detected a non-union (' . $_ . ')') for ( 'Int', 'ArrayRef[Foo | Int]', @@ -100,6 +100,6 @@ ok(!Moose::Util::TypeConstraints::_detect_type_constraint_union($_), is_deeply( [ Moose::Util::TypeConstraints::_parse_type_constraint_union($_) ], $split_tests{$_}, - '... this correctly split the union (' . $_ . ')' + 'this correctly split the union (' . $_ . ')' ) for keys %split_tests; } diff --git a/t/040_type_constraints/015_enum.t b/t/040_type_constraints/015_enum.t index 162905e..9286794 100644 --- a/t/040_type_constraints/015_enum.t +++ b/t/040_type_constraints/015_enum.t @@ -50,8 +50,8 @@ ok(!Metacharacter($_), "'$_' is not a metacharacter") my $anon_enum = enum \@valid_languages; isa_ok($anon_enum, 'Moose::Meta::TypeConstraint'); -is($anon_enum->name, '__ANON__', '... got the right name'); -is($anon_enum->parent->name, 'Str', '... got the right parent name'); +is($anon_enum->name, '__ANON__', 'got the right name'); +is($anon_enum->parent->name, 'Str', 'got the right parent name'); ok($anon_enum->check($_), "'$_' is a language") for @valid_languages; diff --git a/t/040_type_constraints/016_subtyping_parameterized_types.t b/t/040_type_constraints/016_subtyping_parameterized_types.t index 81d7ff1..aad97e6 100644 --- a/t/040_type_constraints/016_subtyping_parameterized_types.t +++ b/t/040_type_constraints/016_subtyping_parameterized_types.t @@ -12,22 +12,22 @@ BEGIN { lives_ok { subtype 'MySpecialHash' => as 'HashRef[Int]'; -} '... created the subtype special okay'; +} 'created the subtype special okay'; { my $t = find_type_constraint('MySpecialHash'); isa_ok($t, 'Moose::Meta::TypeConstraint'); - is($t->name, 'MySpecialHash', '... name is correct'); + is($t->name, 'MySpecialHash', 'name is correct'); my $p = $t->parent; isa_ok($p, 'Moose::Meta::TypeConstraint::Parameterized'); isa_ok($p, 'Moose::Meta::TypeConstraint'); - is($p->name, 'HashRef[Int]', '... parent name is correct'); + is($p->name, 'HashRef[Int]', 'parent name is correct'); - ok($t->check({ one => 1, two => 2 }), '... validated {one=>1, two=>2} correctly'); - ok(!$t->check({ one => "ONE", two => "TWO" }), '... validated it correctly'); + ok($t->check({ one => 1, two => 2 }), 'validated {one=>1, two=>2} correctly'); + ok(!$t->check({ one => "ONE", two => "TWO" }), 'validated it correctly'); ok( $t->equals($t), "equals to self" ); ok( !$t->equals( $t->parent ), "not equal to parent" ); @@ -44,23 +44,23 @@ lives_ok { # all values are less then 10 (scalar grep { $_ < 10 } values %{$_}) ? 1 : undef }; -} '... created the subtype special okay'; +} 'created the subtype special okay'; { my $t = find_type_constraint('MySpecialHashExtended'); isa_ok($t, 'Moose::Meta::TypeConstraint'); - is($t->name, 'MySpecialHashExtended', '... name is correct'); + is($t->name, 'MySpecialHashExtended', 'name is correct'); my $p = $t->parent; isa_ok($p, 'Moose::Meta::TypeConstraint::Parameterized'); isa_ok($p, 'Moose::Meta::TypeConstraint'); - is($p->name, 'HashRef[Int]', '... parent name is correct'); + is($p->name, 'HashRef[Int]', 'parent name is correct'); - ok($t->check({ one => 1, two => 2 }), '... validated it correctly'); - ok(!$t->check({ zero => 10, one => 11, two => 12 }), '... validated { zero => 10, one => 11, two => 12 } correctly'); - ok(!$t->check({ one => "ONE", two => "TWO" }), '... validated it correctly'); + ok($t->check({ one => 1, two => 2 }), 'validated it correctly'); + ok(!$t->check({ zero => 10, one => 11, two => 12 }), 'validated { zero => 10, one => 11, two => 12 } correctly'); + ok(!$t->check({ one => "ONE", two => "TWO" }), 'validated it correctly'); } lives_ok { diff --git a/t/040_type_constraints/017_subtyping_union_types.t b/t/040_type_constraints/017_subtyping_union_types.t index 626a4bb..0841113 100644 --- a/t/040_type_constraints/017_subtyping_union_types.t +++ b/t/040_type_constraints/017_subtyping_union_types.t @@ -12,23 +12,23 @@ BEGIN { lives_ok { subtype 'MyCollections' => as 'ArrayRef | HashRef'; -} '... created the subtype special okay'; +} 'created the subtype special okay'; { my $t = find_type_constraint('MyCollections'); isa_ok($t, 'Moose::Meta::TypeConstraint'); - is($t->name, 'MyCollections', '... name is correct'); + is($t->name, 'MyCollections', 'name is correct'); my $p = $t->parent; isa_ok($p, 'Moose::Meta::TypeConstraint::Union'); isa_ok($p, 'Moose::Meta::TypeConstraint'); - is($p->name, 'ArrayRef|HashRef', '... parent name is correct'); + is($p->name, 'ArrayRef|HashRef', 'parent name is correct'); - ok($t->check([]), '... validated it correctly'); - ok($t->check({}), '... validated it correctly'); - ok(!$t->check(1), '... validated it correctly'); + ok($t->check([]), 'validated it correctly'); + ok($t->check({}), 'validated it correctly'); + ok(!$t->check(1), 'validated it correctly'); } lives_ok { @@ -43,27 +43,27 @@ lives_ok { } 1; }; -} '... created the subtype special okay'; +} 'created the subtype special okay'; { my $t = find_type_constraint('MyCollectionsExtended'); isa_ok($t, 'Moose::Meta::TypeConstraint'); - is($t->name, 'MyCollectionsExtended', '... name is correct'); + is($t->name, 'MyCollectionsExtended', 'name is correct'); my $p = $t->parent; isa_ok($p, 'Moose::Meta::TypeConstraint::Union'); isa_ok($p, 'Moose::Meta::TypeConstraint'); - is($p->name, 'ArrayRef|HashRef', '... parent name is correct'); + is($p->name, 'ArrayRef|HashRef', 'parent name is correct'); - ok(!$t->check([]), '... validated it correctly'); - ok($t->check([1, 2]), '... validated it correctly'); + ok(!$t->check([]), 'validated it correctly'); + ok($t->check([1, 2]), 'validated it correctly'); - ok(!$t->check({}), '... validated it correctly'); - ok($t->check({ one => 1, two => 2 }), '... validated it correctly'); + ok(!$t->check({}), 'validated it correctly'); + ok($t->check({ one => 1, two => 2 }), 'validated it correctly'); - ok(!$t->check(1), '... validated it correctly'); + ok(!$t->check(1), 'validated it correctly'); } diff --git a/t/040_type_constraints/018_custom_parameterized_types.t b/t/040_type_constraints/018_custom_parameterized_types.t index 2de911b..638fc82 100644 --- a/t/040_type_constraints/018_custom_parameterized_types.t +++ b/t/040_type_constraints/018_custom_parameterized_types.t @@ -17,32 +17,32 @@ lives_ok { # no keys match non-alpha (grep { /[^a-zA-Z]/ } keys %$_) == 0 }; -} '... created the subtype special okay'; +} 'created the subtype special okay'; lives_ok { subtype 'Trihash' => as 'AlphaKeyHash' => where { keys(%$_) == 3 }; -} '... created the subtype special okay'; +} 'created the subtype special okay'; lives_ok { subtype 'Noncon' => as 'Item'; -} '... created the subtype special okay'; +} 'created the subtype special okay'; { my $t = find_type_constraint('AlphaKeyHash'); isa_ok($t, 'Moose::Meta::TypeConstraint'); - is($t->name, 'AlphaKeyHash', '... name is correct'); + is($t->name, 'AlphaKeyHash', 'name is correct'); my $p = $t->parent; isa_ok($p, 'Moose::Meta::TypeConstraint'); - is($p->name, 'HashRef', '... parent name is correct'); + is($p->name, 'HashRef', 'parent name is correct'); - ok($t->check({ one => 1, two => 2 }), '... validated it correctly'); - ok(!$t->check({ one1 => 1, two2 => 2 }), '... validated it correctly'); + ok($t->check({ one => 1, two => 2 }), 'validated it correctly'); + ok(!$t->check({ one1 => 1, two2 => 2 }), 'validated it correctly'); ok( $t->equals($t), "equals to self" ); ok( !$t->equals($t->parent), "not equal to parent" ); @@ -50,10 +50,10 @@ lives_ok { my $hoi = Moose::Util::TypeConstraints::find_or_parse_type_constraint('AlphaKeyHash[Int]'); -ok($hoi->check({ one => 1, two => 2 }), '... validated it correctly'); -ok(!$hoi->check({ one1 => 1, two2 => 2 }), '... validated it correctly'); -ok(!$hoi->check({ one => 'uno', two => 'dos' }), '... validated it correctly'); -ok(!$hoi->check({ one1 => 'un', two2 => 'deux' }), '... validated it correctly'); +ok($hoi->check({ one => 1, two => 2 }), 'validated it correctly'); +ok(!$hoi->check({ one1 => 1, two2 => 2 }), 'validated it correctly'); +ok(!$hoi->check({ one => 'uno', two => 'dos' }), 'validated it correctly'); +ok(!$hoi->check({ one1 => 'un', two2 => 'deux' }), 'validated it correctly'); ok( $hoi->equals($hoi), "equals to self" ); ok( !$hoi->equals($hoi->parent), "equals to self" ); @@ -63,10 +63,10 @@ ok( !$hoi->equals( Moose::Meta::TypeConstraint::Parameterized->new( name => "Oin my $th = Moose::Util::TypeConstraints::find_or_parse_type_constraint('Trihash[Bool]'); -ok(!$th->check({ one => 1, two => 1 }), '... validated it correctly'); -ok($th->check({ one => 1, two => 0, three => 1 }), '... validated it correctly'); -ok(!$th->check({ one => 1, two => 2, three => 1 }), '... validated it correctly'); -ok(!$th->check({foo1 => 1, bar2 => 0, baz3 => 1}), '... validated it correctly'); +ok(!$th->check({ one => 1, two => 1 }), 'validated it correctly'); +ok($th->check({ one => 1, two => 0, three => 1 }), 'validated it correctly'); +ok(!$th->check({ one => 1, two => 2, three => 1 }), 'validated it correctly'); +ok(!$th->check({foo1 => 1, bar2 => 0, baz3 => 1}), 'validated it correctly'); dies_ok { Moose::Meta::TypeConstraint::Parameterized->new( diff --git a/t/040_type_constraints/019_coerced_parameterized_types.t b/t/040_type_constraints/019_coerced_parameterized_types.t index 724b1c0..0934235 100644 --- a/t/040_type_constraints/019_coerced_parameterized_types.t +++ b/t/040_type_constraints/019_coerced_parameterized_types.t @@ -30,13 +30,13 @@ lives_ok { coerce 'ArrayRef' => from 'MyList' => via { [ $_->items ] } -} '... created the coercion okay'; +} 'created the coercion okay'; my $mylist = Moose::Util::TypeConstraints::find_or_parse_type_constraint('MyList[Int]'); -ok($mylist->check(MyList->new(10, 20, 30)), '... validated it correctly (pass)'); -ok(!$mylist->check(MyList->new(10, "two")), '... validated it correctly (fail)'); -ok(!$mylist->check([10]), '... validated it correctly (fail)'); +ok($mylist->check(MyList->new(10, 20, 30)), 'validated it correctly (pass)'); +ok(!$mylist->check(MyList->new(10, "two")), 'validated it correctly (fail)'); +ok(!$mylist->check([10]), 'validated it correctly (fail)'); subtype 'EvenList' => as 'MyList' => where { $_->items % 2 == 0 }; @@ -47,12 +47,12 @@ lives_ok { coerce 'ArrayRef' => from 'EvenList' => via { [ $_->items ] } -} '... created the coercion okay'; +} 'created the coercion okay'; my $evenlist = Moose::Util::TypeConstraints::find_or_parse_type_constraint('EvenList[Int]'); -ok(!$evenlist->check(MyList->new(10, 20, 30)), '... validated it correctly (fail)'); -ok($evenlist->check(MyList->new(10, 20, 30, 40)), '... validated it correctly (pass)'); -ok(!$evenlist->check(MyList->new(10, "two")), '... validated it correctly (fail)'); -ok(!$evenlist->check([10, 20]), '... validated it correctly (fail)'); +ok(!$evenlist->check(MyList->new(10, 20, 30)), 'validated it correctly (fail)'); +ok($evenlist->check(MyList->new(10, 20, 30, 40)), 'validated it correctly (pass)'); +ok(!$evenlist->check(MyList->new(10, "two")), 'validated it correctly (fail)'); +ok(!$evenlist->check([10, 20]), 'validated it correctly (fail)'); diff --git a/t/040_type_constraints/021_maybe_type_constraint.t b/t/040_type_constraints/021_maybe_type_constraint.t index 233a17f..96e54b6 100644 --- a/t/040_type_constraints/021_maybe_type_constraint.t +++ b/t/040_type_constraints/021_maybe_type_constraint.t @@ -20,10 +20,10 @@ ok( $type->equals( Moose::Meta::TypeConstraint::Parameterized->new( name => "__A ok( !$type->equals( Moose::Meta::TypeConstraint::Parameterized->new( name => "__ANON__", parent => find_type_constraint("Maybe"), type_parameter => find_type_constraint("Str") ) ), "not equal to clone with diff param" ); ok( !$type->equals( Moose::Util::TypeConstraints::find_or_parse_type_constraint('Maybe[Str]') ), "not equal to declarative version of diff param" ); -ok($type->check(10), '... checked type correctly (pass)'); -ok($type->check(undef), '... checked type correctly (pass)'); -ok(!$type->check('Hello World'), '... checked type correctly (fail)'); -ok(!$type->check([]), '... checked type correctly (fail)'); +ok($type->check(10), 'checked type correctly (pass)'); +ok($type->check(undef), 'checked type correctly (pass)'); +ok(!$type->check('Hello World'), 'checked type correctly (fail)'); +ok(!$type->check([]), 'checked type correctly (fail)'); { package Bar; @@ -40,39 +40,39 @@ ok(!$type->check([]), '... checked type correctly (fail)'); lives_ok { Foo->new(arr => [], bar => Bar->new); -} '... Bar->new isa Bar'; +} 'Bar->new isa Bar'; dies_ok { Foo->new(arr => [], bar => undef); -} '... undef isnta Bar'; +} 'undef isnta Bar'; lives_ok { Foo->new(arr => [], maybe_bar => Bar->new); -} '... Bar->new isa maybe(Bar)'; +} 'Bar->new isa maybe(Bar)'; lives_ok { Foo->new(arr => [], maybe_bar => undef); -} '... undef isa maybe(Bar)'; +} 'undef isa maybe(Bar)'; dies_ok { Foo->new(arr => [], maybe_bar => 1); -} '... 1 isnta maybe(Bar)'; +} '1 isnta maybe(Bar)'; lives_ok { Foo->new(arr => []); -} '... it worked!'; +} 'it worked!'; lives_ok { Foo->new(arr => undef); -} '... it worked!'; +} 'it worked!'; dies_ok { Foo->new(arr => 100); -} '... failed the type check'; +} 'failed the type check'; dies_ok { Foo->new(arr => 'hello world'); -} '... failed the type check'; +} 'failed the type check'; { diff --git a/t/040_type_constraints/022_custom_type_errors.t b/t/040_type_constraints/022_custom_type_errors.t index c3599b4..7fb9e9c 100644 --- a/t/040_type_constraints/022_custom_type_errors.t +++ b/t/040_type_constraints/022_custom_type_errors.t @@ -26,9 +26,9 @@ use Test::Exception; } lives_ok { my $goat = Animal->new( leg_count => 4 ) } -'... no errors thrown, value is good'; +'no errors thrown, value is good'; lives_ok { my $spider = Animal->new( leg_count => 8 ) } -'... no errors thrown, value is good'; +'no errors thrown, value is good'; throws_ok { my $fern = Animal->new( leg_count => 0 ) } qr/This number \(0\) is not less than ten!/, @@ -40,7 +40,7 @@ qr/This number \(30\) is not less than ten!/, my $chimera; lives_ok { $chimera = Animal->new( leg_count => 4 ) } -'... no errors thrown, value is good'; +'no errors thrown, value is good'; throws_ok { $chimera->leg_count(0) } qr/This number \(0\) is not less than ten!/, @@ -51,7 +51,7 @@ qr/This number \(16\) is not less than ten!/, 'gave custom subtype error message on set to 16'; my $gimp = eval { Animal->new() }; -is( $@, '', '... no errors thrown, value is good' ); +is( $@, '', 'no errors thrown, value is good' ); throws_ok { $gimp->leg_count } qr/This number \(0\) is not less than ten!/, diff --git a/t/040_type_constraints/023_types_and_undef.t b/t/040_type_constraints/023_types_and_undef.t index ca36bdb..436297d 100644 --- a/t/040_type_constraints/023_types_and_undef.t +++ b/t/040_type_constraints/023_types_and_undef.t @@ -40,73 +40,73 @@ use Test::Exception; # Moose::Util::TypeConstraints->export_type_constraints_as_functions; -ok( Undef(undef), '... undef is a Undef'); -ok(!Defined(undef), '... undef is NOT a Defined'); -ok(!Int(undef), '... undef is NOT a Int'); -ok(!Number(undef), '... undef is NOT a Number'); -ok(!Str(undef), '... undef is NOT a Str'); -ok(!String(undef), '... undef is NOT a String'); - -ok(!Undef(5), '... 5 is a NOT a Undef'); -ok(Defined(5), '... 5 is a Defined'); -ok(Int(5), '... 5 is a Int'); -ok(Number(5), '... 5 is a Number'); -ok(Str(5), '... 5 is a Str'); -ok(!String(5), '... 5 is NOT a String'); - -ok(!Undef(0.5), '... 0.5 is a NOT a Undef'); -ok(Defined(0.5), '... 0.5 is a Defined'); -ok(!Int(0.5), '... 0.5 is NOT a Int'); -ok(Number(0.5), '... 0.5 is a Number'); -ok(Str(0.5), '... 0.5 is a Str'); -ok(!String(0.5), '... 0.5 is NOT a String'); - -ok(!Undef('Foo'), '... "Foo" is NOT a Undef'); -ok(Defined('Foo'), '... "Foo" is a Defined'); -ok(!Int('Foo'), '... "Foo" is NOT a Int'); -ok(!Number('Foo'), '... "Foo" is NOT a Number'); -ok(Str('Foo'), '... "Foo" is a Str'); -ok(String('Foo'), '... "Foo" is a String'); +ok( Undef(undef), 'undef is a Undef'); +ok(!Defined(undef), 'undef is NOT a Defined'); +ok(!Int(undef), 'undef is NOT a Int'); +ok(!Number(undef), 'undef is NOT a Number'); +ok(!Str(undef), 'undef is NOT a Str'); +ok(!String(undef), 'undef is NOT a String'); + +ok(!Undef(5), '5 is a NOT a Undef'); +ok(Defined(5), '5 is a Defined'); +ok(Int(5), '5 is a Int'); +ok(Number(5), '5 is a Number'); +ok(Str(5), '5 is a Str'); +ok(!String(5), '5 is NOT a String'); + +ok(!Undef(0.5), '0.5 is a NOT a Undef'); +ok(Defined(0.5), '0.5 is a Defined'); +ok(!Int(0.5), '0.5 is NOT a Int'); +ok(Number(0.5), '0.5 is a Number'); +ok(Str(0.5), '0.5 is a Str'); +ok(!String(0.5), '0.5 is NOT a String'); + +ok(!Undef('Foo'), '"Foo" is NOT a Undef'); +ok(Defined('Foo'), '"Foo" is a Defined'); +ok(!Int('Foo'), '"Foo" is NOT a Int'); +ok(!Number('Foo'), '"Foo" is NOT a Number'); +ok(Str('Foo'), '"Foo" is a Str'); +ok(String('Foo'), '"Foo" is a String'); my $foo = Foo->new; -lives_ok { $foo->vUndef(undef) } '... undef is a Foo->Undef'; -dies_ok { $foo->vDefined(undef) } '... undef is NOT a Foo->Defined'; -dies_ok { $foo->vInt(undef) } '... undef is NOT a Foo->Int'; -dies_ok { $foo->vNumber(undef) } '... undef is NOT a Foo->Number'; -dies_ok { $foo->vStr(undef) } '... undef is NOT a Foo->Str'; -dies_ok { $foo->vString(undef) } '... undef is NOT a Foo->String'; - -dies_ok { $foo->vUndef(5) } '... 5 is NOT a Foo->Undef'; -lives_ok { $foo->vDefined(5) } '... 5 is a Foo->Defined'; -lives_ok { $foo->vInt(5) } '... 5 is a Foo->Int'; -lives_ok { $foo->vNumber(5) } '... 5 is a Foo->Number'; -lives_ok { $foo->vStr(5) } '... 5 is a Foo->Str'; -dies_ok { $foo->vString(5) } '... 5 is NOT a Foo->String'; - -dies_ok { $foo->vUndef(0.5) } '... 0.5 is NOT a Foo->Undef'; -lives_ok { $foo->vDefined(0.5) } '... 0.5 is a Foo->Defined'; -dies_ok { $foo->vInt(0.5) } '... 0.5 is NOT a Foo->Int'; -lives_ok { $foo->vNumber(0.5) } '... 0.5 is a Foo->Number'; -lives_ok { $foo->vStr(0.5) } '... 0.5 is a Foo->Str'; -dies_ok { $foo->vString(0.5) } '... 0.5 is NOT a Foo->String'; - -dies_ok { $foo->vUndef('Foo') } '... "Foo" is NOT a Foo->Undef'; -lives_ok { $foo->vDefined('Foo') } '... "Foo" is a Foo->Defined'; -dies_ok { $foo->vInt('Foo') } '... "Foo" is NOT a Foo->Int'; -dies_ok { $foo->vNumber('Foo') } '... "Foo" is NOT a Foo->Number'; -lives_ok { $foo->vStr('Foo') } '... "Foo" is a Foo->Str'; -lives_ok { $foo->vString('Foo') } '... "Foo" is a Foo->String'; +lives_ok { $foo->vUndef(undef) } 'undef is a Foo->Undef'; +dies_ok { $foo->vDefined(undef) } 'undef is NOT a Foo->Defined'; +dies_ok { $foo->vInt(undef) } 'undef is NOT a Foo->Int'; +dies_ok { $foo->vNumber(undef) } 'undef is NOT a Foo->Number'; +dies_ok { $foo->vStr(undef) } 'undef is NOT a Foo->Str'; +dies_ok { $foo->vString(undef) } 'undef is NOT a Foo->String'; + +dies_ok { $foo->vUndef(5) } '5 is NOT a Foo->Undef'; +lives_ok { $foo->vDefined(5) } '5 is a Foo->Defined'; +lives_ok { $foo->vInt(5) } '5 is a Foo->Int'; +lives_ok { $foo->vNumber(5) } '5 is a Foo->Number'; +lives_ok { $foo->vStr(5) } '5 is a Foo->Str'; +dies_ok { $foo->vString(5) } '5 is NOT a Foo->String'; + +dies_ok { $foo->vUndef(0.5) } '0.5 is NOT a Foo->Undef'; +lives_ok { $foo->vDefined(0.5) } '0.5 is a Foo->Defined'; +dies_ok { $foo->vInt(0.5) } '0.5 is NOT a Foo->Int'; +lives_ok { $foo->vNumber(0.5) } '0.5 is a Foo->Number'; +lives_ok { $foo->vStr(0.5) } '0.5 is a Foo->Str'; +dies_ok { $foo->vString(0.5) } '0.5 is NOT a Foo->String'; + +dies_ok { $foo->vUndef('Foo') } '"Foo" is NOT a Foo->Undef'; +lives_ok { $foo->vDefined('Foo') } '"Foo" is a Foo->Defined'; +dies_ok { $foo->vInt('Foo') } '"Foo" is NOT a Foo->Int'; +dies_ok { $foo->vNumber('Foo') } '"Foo" is NOT a Foo->Number'; +lives_ok { $foo->vStr('Foo') } '"Foo" is a Foo->Str'; +lives_ok { $foo->vString('Foo') } '"Foo" is a Foo->String'; # the lazy tests -lives_ok { $foo->v_lazy_Undef() } '... undef is a Foo->Undef'; -dies_ok { $foo->v_lazy_Defined() } '... undef is NOT a Foo->Defined'; -dies_ok { $foo->v_lazy_Int() } '... undef is NOT a Foo->Int'; -dies_ok { $foo->v_lazy_Number() } '... undef is NOT a Foo->Number'; -dies_ok { $foo->v_lazy_Str() } '... undef is NOT a Foo->Str'; -dies_ok { $foo->v_lazy_String() } '... undef is NOT a Foo->String'; +lives_ok { $foo->v_lazy_Undef() } 'undef is a Foo->Undef'; +dies_ok { $foo->v_lazy_Defined() } 'undef is NOT a Foo->Defined'; +dies_ok { $foo->v_lazy_Int() } 'undef is NOT a Foo->Int'; +dies_ok { $foo->v_lazy_Number() } 'undef is NOT a Foo->Number'; +dies_ok { $foo->v_lazy_Str() } 'undef is NOT a Foo->Str'; +dies_ok { $foo->v_lazy_String() } 'undef is NOT a Foo->String'; diff --git a/t/040_type_constraints/036_match_type_operator.t b/t/040_type_constraints/036_match_type_operator.t index f5fa5ad..2807970 100644 --- a/t/040_type_constraints/036_match_type_operator.t +++ b/t/040_type_constraints/036_match_type_operator.t @@ -38,15 +38,15 @@ sub rev { ArrayRef => sub { [ @{ rev( tail( $_ ) ) }, head( $_ ) ] }; } -is( len( [] ), 0, '... got the right length'); -is( len( [ 1 ] ), 1, '... got the right length'); -is( len( [ 1 .. 5 ] ), 5, '... got the right length'); -is( len( [ 1 .. 50 ] ), 50, '... got the right length'); +is( len( [] ), 0, 'got the right length'); +is( len( [ 1 ] ), 1, 'got the right length'); +is( len( [ 1 .. 5 ] ), 5, 'got the right length'); +is( len( [ 1 .. 50 ] ), 50, 'got the right length'); is_deeply( rev( [ 1 .. 5 ] ), [ reverse 1 .. 5 ], - '... got the right reversed value' + 'got the right reversed value' ); # break down a Maybe Type ... @@ -62,10 +62,10 @@ sub break_it_down { } -is( break_it_down( 'FOO' ), 'FOO', '... got the right value'); -is( break_it_down( [] ), 'default', '... got the right value'); -is( break_it_down( undef ), 'undef', '... got the right value'); -is( break_it_down(), 'undef', '... got the right value'); +is( break_it_down( 'FOO' ), 'FOO', 'got the right value'); +is( break_it_down( [] ), 'default', 'got the right value'); +is( break_it_down( undef ), 'undef', 'got the right value'); +is( break_it_down(), 'undef', 'got the right value'); # checking against enum types @@ -79,17 +79,17 @@ sub is_acceptable_color { sub { die "bad color $_" }; } -is( is_acceptable_color( 'blue' ), 'RGB', '... got the right value'); -is( is_acceptable_color( 'green' ), 'RGB', '... got the right value'); -is( is_acceptable_color( 'red' ), 'RGB', '... got the right value'); -is( is_acceptable_color( 'cyan' ), 'CMYK', '... got the right value'); -is( is_acceptable_color( 'magenta' ), 'CMYK', '... got the right value'); -is( is_acceptable_color( 'yellow' ), 'CMYK', '... got the right value'); -is( is_acceptable_color( 'black' ), 'CMYK', '... got the right value'); +is( is_acceptable_color( 'blue' ), 'RGB', 'got the right value'); +is( is_acceptable_color( 'green' ), 'RGB', 'got the right value'); +is( is_acceptable_color( 'red' ), 'RGB', 'got the right value'); +is( is_acceptable_color( 'cyan' ), 'CMYK', 'got the right value'); +is( is_acceptable_color( 'magenta' ), 'CMYK', 'got the right value'); +is( is_acceptable_color( 'yellow' ), 'CMYK', 'got the right value'); +is( is_acceptable_color( 'black' ), 'CMYK', 'got the right value'); dies_ok { is_acceptable_color( 'orange' ) -} '... got the exception'; +} 'got the exception'; ## using it in an OO context @@ -118,13 +118,13 @@ dies_ok { } my $l = LinkedList->new; -is($l->pprint, '[]', '... got the right pprint'); +is($l->pprint, '[]', 'got the right pprint'); $l->next; -is($l->pprint, '[[]]', '... got the right pprint'); +is($l->pprint, '[[]]', 'got the right pprint'); $l->next->next; -is($l->pprint, '[[[]]]', '... got the right pprint'); +is($l->pprint, '[[[]]]', 'got the right pprint'); $l->next->next->next; -is($l->pprint, '[[[[]]]]', '... got the right pprint'); +is($l->pprint, '[[[[]]]]', 'got the right pprint'); # basic data dumper @@ -171,7 +171,7 @@ is( } ), '{ five => *ppprint, four => qr/(?-xism:.*?)/, one => [ 1, 2, "three", 4, "five", \"six" ], six => Foo(), three => sub { ... }, two => undef }', - '... got the right pretty printed values' + 'got the right pretty printed values' ); # simple JSON serializer @@ -196,7 +196,7 @@ sub to_json { is( to_json( { one => 1, two => 2 } ), '{ "one" : 1, "two" : 2 }', - '... got our valid JSON' + 'got our valid JSON' ); is( @@ -206,7 +206,7 @@ is( three => "Hello World" } ), '{ "one" : [ 1, 2, 3, 4 ], "three" : "Hello World", "two" : null }', - '... got our valid JSON' + 'got our valid JSON' ); @@ -221,7 +221,7 @@ sub not_enough_matches { throws_ok { not_enough_matches( [] ) -} qr/No cases matched for /, '... not enough matches'; +} qr/No cases matched for /, 'not enough matches'; diff --git a/t/050_metaclasses/001_custom_attr_meta_with_roles.t b/t/050_metaclasses/001_custom_attr_meta_with_roles.t index 2d89151..3376b73 100644 --- a/t/050_metaclasses/001_custom_attr_meta_with_roles.t +++ b/t/050_metaclasses/001_custom_attr_meta_with_roles.t @@ -36,7 +36,7 @@ use Test::Exception; my $c = My::Class->new; isa_ok($c, 'My::Class'); -ok($c->meta->has_attribute('bling_bling'), '... got the attribute'); +ok($c->meta->has_attribute('bling_bling'), 'got the attribute'); isa_ok($c->meta->get_attribute('bling_bling'), 'My::Custom::Meta::Attr'); diff --git a/t/050_metaclasses/003_moose_w_metaclass.t b/t/050_metaclasses/003_moose_w_metaclass.t index 2a880d9..92ed59f 100644 --- a/t/050_metaclasses/003_moose_w_metaclass.t +++ b/t/050_metaclasses/003_moose_w_metaclass.t @@ -49,8 +49,8 @@ isa_ok(Foo->meta, 'Foo::Meta'); use warnings; use metaclass 'Bar::Meta'; eval 'use Moose;'; - ::ok($@, '... could not load moose without correct metaclass'); + ::ok($@, 'could not load moose without correct metaclass'); ::like($@, qr/^Bar already has a metaclass, but it does not inherit Moose::Meta::Class/, - '... got the right error too'); + 'got the right error too'); } diff --git a/t/050_metaclasses/004_moose_for_meta.t b/t/050_metaclasses/004_moose_for_meta.t index 003e2f7..06738db 100644 --- a/t/050_metaclasses/004_moose_for_meta.t +++ b/t/050_metaclasses/004_moose_for_meta.t @@ -38,7 +38,7 @@ isa_ok($anon, 'Class::MOP::Class'); is_deeply( [ $anon->superclasses ], [ 'Moose::Object' ], - '... got the default superclasses'); + 'got the default superclasses'); { package My::Meta::Attribute::DefaultReadOnly; @@ -61,9 +61,9 @@ is_deeply( isa_ok($attr, 'Moose::Meta::Attribute'); isa_ok($attr, 'Class::MOP::Attribute'); - ok($attr->has_reader, '... the attribute has a reader (as expected)'); - ok(!$attr->has_writer, '... the attribute does not have a writer (as expected)'); - ok(!$attr->has_accessor, '... the attribute does not have an accessor (as expected)'); + ok($attr->has_reader, 'the attribute has a reader (as expected)'); + ok(!$attr->has_writer, 'the attribute does not have a writer (as expected)'); + ok(!$attr->has_accessor, 'the attribute does not have an accessor (as expected)'); } { @@ -72,8 +72,8 @@ is_deeply( isa_ok($attr, 'Moose::Meta::Attribute'); isa_ok($attr, 'Class::MOP::Attribute'); - ok(!$attr->has_reader, '... the attribute does not have a reader (as expected)'); - ok(!$attr->has_writer, '... the attribute does not have a writer (as expected)'); - ok($attr->has_accessor, '... the attribute does have an accessor (as expected)'); + ok(!$attr->has_reader, 'the attribute does not have a reader (as expected)'); + ok(!$attr->has_writer, 'the attribute does not have a writer (as expected)'); + ok($attr->has_accessor, 'the attribute does have an accessor (as expected)'); } diff --git a/t/050_metaclasses/010_extending_and_embedding_back_compat.t b/t/050_metaclasses/010_extending_and_embedding_back_compat.t index 6ec3a5a..14b08d9 100644 --- a/t/050_metaclasses/010_extending_and_embedding_back_compat.t +++ b/t/050_metaclasses/010_extending_and_embedding_back_compat.t @@ -51,7 +51,7 @@ isa_ok($obj, 'MyClass'); isa_ok($obj, 'MyFramework::Base'); isa_ok($obj, 'Moose::Object'); -is($obj->foo, 10, '... got the right value'); +is($obj->foo, 10, 'got the right value'); diff --git a/t/050_metaclasses/011_init_meta.t b/t/050_metaclasses/011_init_meta.t index 96290dd..601b122 100644 --- a/t/050_metaclasses/011_init_meta.t +++ b/t/050_metaclasses/011_init_meta.t @@ -12,8 +12,8 @@ use Moose (); my $meta = Moose::init_meta('Foo'); -ok( Foo->isa('Moose::Object'), '... Foo isa Moose::Object'); +ok( Foo->isa('Moose::Object'), 'Foo isa Moose::Object'); isa_ok( $meta, 'Moose::Meta::Class' ); isa_ok( Foo->meta, 'Moose::Meta::Class' ); -is($meta, Foo->meta, '... our metas are the same'); +is($meta, Foo->meta, 'our metas are the same'); diff --git a/t/050_metaclasses/013_metaclass_traits.t b/t/050_metaclasses/013_metaclass_traits.t index 9211f33..36337e2 100644 --- a/t/050_metaclasses/013_metaclass_traits.t +++ b/t/050_metaclasses/013_metaclass_traits.t @@ -170,7 +170,7 @@ is( Role::Foo->meta()->simple(), 5, dies_ok( sub { Moose::Util::TypeConstraints->import( -traits => 'My::SimpleTrait' ) }, 'cannot provide -traits to an exporting module that does not init_meta' ); like( $@, qr/does not have an init_meta/, - '... and error provides a useful explanation' ); + 'and error provides a useful explanation' ); } { diff --git a/t/050_metaclasses/015_metarole.t b/t/050_metaclasses/015_metarole.t index 5cd2dd7..f811023 100644 --- a/t/050_metaclasses/015_metarole.t +++ b/t/050_metaclasses/015_metarole.t @@ -43,7 +43,7 @@ use Moose::Util::MetaRole; ok( My::Class->meta()->meta()->does_role('Role::Foo'), 'apply Role::Foo to My::Class->meta()' ); is( My::Class->meta()->foo(), 10, - '... and call foo() on that meta object' ); + 'and call foo() on that meta object' ); } { @@ -55,11 +55,11 @@ use Moose::Util::MetaRole; ok( My::Class->meta()->attribute_metaclass()->meta()->does_role('Role::Foo'), q{apply Role::Foo to My::Class->meta()'s attribute metaclass} ); ok( My::Class->meta()->meta()->does_role('Role::Foo'), - '... My::Class->meta() still does Role::Foo' ); + 'My::Class->meta() still does Role::Foo' ); My::Class->meta()->add_attribute( 'size', is => 'ro' ); is( My::Class->meta()->get_attribute('size')->foo(), 10, - '... call foo() on an attribute metaclass object' ); + 'call foo() on an attribute metaclass object' ); } { @@ -71,13 +71,13 @@ use Moose::Util::MetaRole; ok( My::Class->meta()->method_metaclass()->meta()->does_role('Role::Foo'), q{apply Role::Foo to My::Class->meta()'s method metaclass} ); ok( My::Class->meta()->meta()->does_role('Role::Foo'), - '... My::Class->meta() still does Role::Foo' ); + 'My::Class->meta() still does Role::Foo' ); ok( My::Class->meta()->attribute_metaclass()->meta()->does_role('Role::Foo'), q{... My::Class->meta()'s attribute metaclass still does Role::Foo} ); My::Class->meta()->add_method( 'bar' => sub { 'bar' } ); is( My::Class->meta()->get_method('bar')->foo(), 10, - '... call foo() on a method metaclass object' ); + 'call foo() on a method metaclass object' ); } { @@ -89,15 +89,15 @@ use Moose::Util::MetaRole; ok( My::Class->meta()->wrapped_method_metaclass()->meta()->does_role('Role::Foo'), q{apply Role::Foo to My::Class->meta()'s wrapped method metaclass} ); ok( My::Class->meta()->method_metaclass()->meta()->does_role('Role::Foo'), - '... My::Class->meta() still does Role::Foo' ); + 'My::Class->meta() still does Role::Foo' ); ok( My::Class->meta()->meta()->does_role('Role::Foo'), - '... My::Class->meta() still does Role::Foo' ); + 'My::Class->meta() still does Role::Foo' ); ok( My::Class->meta()->attribute_metaclass()->meta()->does_role('Role::Foo'), q{... My::Class->meta()'s attribute metaclass still does Role::Foo} ); My::Class->meta()->add_after_method_modifier( 'bar' => sub { 'bar' } ); is( My::Class->meta()->get_method('bar')->foo(), 10, - '... call foo() on a wrapped method metaclass object' ); + 'call foo() on a wrapped method metaclass object' ); } { @@ -109,14 +109,14 @@ use Moose::Util::MetaRole; ok( My::Class->meta()->instance_metaclass()->meta()->does_role('Role::Foo'), q{apply Role::Foo to My::Class->meta()'s instance metaclass} ); ok( My::Class->meta()->meta()->does_role('Role::Foo'), - '... My::Class->meta() still does Role::Foo' ); + 'My::Class->meta() still does Role::Foo' ); ok( My::Class->meta()->attribute_metaclass()->meta()->does_role('Role::Foo'), q{... My::Class->meta()'s attribute metaclass still does Role::Foo} ); ok( My::Class->meta()->method_metaclass()->meta()->does_role('Role::Foo'), q{... My::Class->meta()'s method metaclass still does Role::Foo} ); is( My::Class->meta()->get_meta_instance()->foo(), 10, - '... call foo() on an instance metaclass object' ); + 'call foo() on an instance metaclass object' ); } { @@ -128,7 +128,7 @@ use Moose::Util::MetaRole; ok( My::Class->meta()->constructor_class()->meta()->does_role('Role::Foo'), q{apply Role::Foo to My::Class->meta()'s constructor class} ); ok( My::Class->meta()->meta()->does_role('Role::Foo'), - '... My::Class->meta() still does Role::Foo' ); + 'My::Class->meta() still does Role::Foo' ); ok( My::Class->meta()->attribute_metaclass()->meta()->does_role('Role::Foo'), q{... My::Class->meta()'s attribute metaclass still does Role::Foo} ); ok( My::Class->meta()->method_metaclass()->meta()->does_role('Role::Foo'), @@ -138,7 +138,7 @@ use Moose::Util::MetaRole; # Actually instantiating the constructor class is too freaking hard! ok( My::Class->meta()->constructor_class()->can('foo'), - '... constructor class has a foo method' ); + 'constructor class has a foo method' ); } { @@ -150,7 +150,7 @@ use Moose::Util::MetaRole; ok( My::Class->meta()->destructor_class()->meta()->does_role('Role::Foo'), q{apply Role::Foo to My::Class->meta()'s destructor class} ); ok( My::Class->meta()->meta()->does_role('Role::Foo'), - '... My::Class->meta() still does Role::Foo' ); + 'My::Class->meta() still does Role::Foo' ); ok( My::Class->meta()->attribute_metaclass()->meta()->does_role('Role::Foo'), q{... My::Class->meta()'s attribute metaclass still does Role::Foo} ); ok( My::Class->meta()->method_metaclass()->meta()->does_role('Role::Foo'), @@ -162,7 +162,7 @@ use Moose::Util::MetaRole; # same problem as the constructor class ok( My::Class->meta()->destructor_class()->can('foo'), - '... destructor class has a foo method' ); + 'destructor class has a foo method' ); } { @@ -219,7 +219,7 @@ use Moose::Util::MetaRole; ok( My::Class->meta()->does_role('Role::Foo'), 'apply Role::Foo to My::Class base class' ); is( My::Class->new()->foo(), 10, - '... call foo() on a My::Class object' ); + 'call foo() on a My::Class object' ); } { @@ -242,35 +242,35 @@ use Moose::Util::MetaRole; ok( My::Class2->meta()->meta()->does_role('Role::Foo'), 'apply Role::Foo to My::Class2->meta()' ); is( My::Class2->meta()->foo(), 10, - '... and call foo() on that meta object' ); + 'and call foo() on that meta object' ); ok( My::Class2->meta()->attribute_metaclass()->meta()->does_role('Role::Foo'), q{apply Role::Foo to My::Class2->meta()'s attribute metaclass} ); My::Class2->meta()->add_attribute( 'size', is => 'ro' ); is( My::Class2->meta()->get_attribute('size')->foo(), 10, - '... call foo() on an attribute metaclass object' ); + 'call foo() on an attribute metaclass object' ); ok( My::Class2->meta()->method_metaclass()->meta()->does_role('Role::Foo'), q{apply Role::Foo to My::Class2->meta()'s method metaclass} ); My::Class2->meta()->add_method( 'bar' => sub { 'bar' } ); is( My::Class2->meta()->get_method('bar')->foo(), 10, - '... call foo() on a method metaclass object' ); + 'call foo() on a method metaclass object' ); ok( My::Class2->meta()->instance_metaclass()->meta()->does_role('Role::Foo'), q{apply Role::Foo to My::Class2->meta()'s instance metaclass} ); is( My::Class2->meta()->get_meta_instance()->foo(), 10, - '... call foo() on an instance metaclass object' ); + 'call foo() on an instance metaclass object' ); ok( My::Class2->meta()->constructor_class()->meta()->does_role('Role::Foo'), q{apply Role::Foo to My::Class2->meta()'s constructor class} ); ok( My::Class2->meta()->constructor_class()->can('foo'), - '... constructor class has a foo method' ); + 'constructor class has a foo method' ); ok( My::Class2->meta()->destructor_class()->meta()->does_role('Role::Foo'), q{apply Role::Foo to My::Class2->meta()'s destructor class} ); ok( My::Class2->meta()->destructor_class()->can('foo'), - '... destructor class has a foo method' ); + 'destructor class has a foo method' ); } @@ -304,7 +304,7 @@ use Moose::Util::MetaRole; ok( My::Class3->meta()->meta()->does_role('Role::Foo'), 'apply Role::Foo to My::Class3->meta()' ); is( My::Class3->meta()->foo(), 10, - '... and call foo() on that meta object' ); + 'and call foo() on that meta object' ); ok( ( grep { $_ eq 'My::Meta::Class' } My::Class3->meta()->meta()->superclasses() ), 'apply_metaclass_roles() does not interfere with metaclass set via Moose->init_meta()' ); } @@ -337,7 +337,7 @@ use Moose::Util::MetaRole; ok( My::Class4->meta()->meta()->does_role('Role::Bar'), 'apply Role::Bar to My::Class4->meta()' ); ok( My::Class4->meta()->meta()->does_role('Role::Foo'), - '... and My::Class4->meta() still does Role::Foo' ); + 'and My::Class4->meta() still does Role::Foo' ); } { diff --git a/t/050_metaclasses/016_metarole_w_metaclass_pm.t b/t/050_metaclasses/016_metarole_w_metaclass_pm.t index 4db435e..7e13054 100644 --- a/t/050_metaclasses/016_metarole_w_metaclass_pm.t +++ b/t/050_metaclasses/016_metarole_w_metaclass_pm.t @@ -84,15 +84,15 @@ BEGIN ok( My::Class2->meta()->attribute_metaclass()->meta()->does_role('Role::Foo'), q{apply Role::Foo to My::Class2->meta()'s attribute metaclass} ); has_superclass( My::Class2->meta()->attribute_metaclass(), 'My::Meta::Attribute', - '... and this does not interfere with attribute metaclass set via metaclass.pm' ); + 'and this does not interfere with attribute metaclass set via metaclass.pm' ); ok( My::Class2->meta()->method_metaclass()->meta()->does_role('Role::Foo'), q{apply Role::Foo to My::Class2->meta()'s method metaclass} ); has_superclass( My::Class2->meta()->method_metaclass(), 'My::Meta::Method', - '... and this does not interfere with method metaclass set via metaclass.pm' ); + 'and this does not interfere with method metaclass set via metaclass.pm' ); ok( My::Class2->meta()->instance_metaclass()->meta()->does_role('Role::Foo'), q{apply Role::Foo to My::Class2->meta()'s instance metaclass} ); has_superclass( My::Class2->meta()->instance_metaclass(), 'My::Meta::Instance', - '... and this does not interfere with instance metaclass set via metaclass.pm' ); + 'and this does not interfere with instance metaclass set via metaclass.pm' ); } # like isa_ok but works with a class name, not just refs diff --git a/t/060_compat/001_module_refresh_compat.t b/t/060_compat/001_module_refresh_compat.t index 93857cd..dbf6f07 100644 --- a/t/060_compat/001_module_refresh_compat.t +++ b/t/060_compat/001_module_refresh_compat.t @@ -25,11 +25,11 @@ my @modules = qw[Foo Bar MyMooseA MyMooseB MyMooseObject]; do { use_ok($_); - is($_->meta->name, $_, '... initialized the meta correctly'); + is($_->meta->name, $_, 'initialized the meta correctly'); lives_ok { Module::Refresh->new->refresh_module($_ . '.pm') - } '... successfully refreshed ' . $_; + } 'successfully refreshed ' . $_; } foreach @modules; =pod @@ -64,9 +64,9 @@ has 'foo' => (is => 'rw', isa => 'Int'); } use_ok('TestBaz'); -is(TestBaz->meta->name, 'TestBaz', '... initialized the meta correctly'); -ok(TestBaz->meta->has_attribute('foo'), '... it has the foo attribute as well'); -ok(!TestBaz->isa('Foo'), '... TestBaz is not a Foo'); +is(TestBaz->meta->name, 'TestBaz', 'initialized the meta correctly'); +ok(TestBaz->meta->has_attribute('foo'), 'it has the foo attribute as well'); +ok(!TestBaz->isa('Foo'), 'TestBaz is not a Foo'); { open FILE, ">", $test_module_file @@ -77,11 +77,11 @@ ok(!TestBaz->isa('Foo'), '... TestBaz is not a Foo'); lives_ok { Module::Refresh->new->refresh_module($test_module_file) -} '... successfully refreshed ' . $test_module_file; +} 'successfully refreshed ' . $test_module_file; -is(TestBaz->meta->name, 'TestBaz', '... initialized the meta correctly'); -ok(TestBaz->meta->has_attribute('foo'), '... it has the foo attribute as well'); -ok(TestBaz->isa('Foo'), '... TestBaz is a Foo'); +is(TestBaz->meta->name, 'TestBaz', 'initialized the meta correctly'); +ok(TestBaz->meta->has_attribute('foo'), 'it has the foo attribute as well'); +ok(TestBaz->isa('Foo'), 'TestBaz is a Foo'); unlink $test_module_file; diff --git a/t/060_compat/002_moose_respects_base.t b/t/060_compat/002_moose_respects_base.t index 2e37c9d..979a589 100644 --- a/t/060_compat/002_moose_respects_base.t +++ b/t/060_compat/002_moose_respects_base.t @@ -40,7 +40,7 @@ this test also demonstrates. my $bar = Bar->new; isa_ok($bar, 'Bar'); isa_ok($bar, 'Foo'); -ok(!$bar->isa('Moose::Object'), '... Bar is not Moose::Object subclass'); +ok(!$bar->isa('Moose::Object'), 'Bar is not Moose::Object subclass'); my $baz = Baz->new; isa_ok($baz, 'Baz'); diff --git a/t/060_compat/003_foreign_inheritence.t b/t/060_compat/003_foreign_inheritence.t index f99cac9..855abe1 100644 --- a/t/060_compat/003_foreign_inheritence.t +++ b/t/060_compat/003_foreign_inheritence.t @@ -76,9 +76,9 @@ isa_ok( $foo_moose, 'Foo::Moose' ); isa_ok( $foo_moose, 'Elk' ); is( $foo_moose->no_moose, 'Elk', - '... got the right value from the Elk method' ); + 'got the right value from the Elk method' ); is( $foo_moose->moose, 'Foo', - '... got the right value from the Foo::Moose method' ); + 'got the right value from the Foo::Moose method' ); lives_ok { Old::Bucket::Nose->meta->make_immutable( debug => 0 ); diff --git a/t/070_native_traits/010_array_from_role.t b/t/070_native_traits/010_array_from_role.t index 80aac85..51d2795 100644 --- a/t/070_native_traits/010_array_from_role.t +++ b/t/070_native_traits/010_array_from_role.t @@ -37,8 +37,8 @@ use Test::Exception; use Moose; ::lives_ok{ with 'Stuffed::Role'; - } '... this should work correctly'; + } 'this should work correctly'; ::lives_ok{ with 'Bulkie::Role'; - } '... this should work correctly'; + } 'this should work correctly'; } diff --git a/t/070_native_traits/020_remove_attribute.t b/t/070_native_traits/020_remove_attribute.t index 49b2cba..61d8bf5 100644 --- a/t/070_native_traits/020_remove_attribute.t +++ b/t/070_native_traits/020_remove_attribute.t @@ -36,10 +36,10 @@ can_ok( $page, $_ ) for qw[ lives_ok { $page->meta->remove_attribute('counter'); } -'... removed the counter attribute okay'; +'removed the counter attribute okay'; ok( !$page->meta->has_attribute('counter'), - '... no longer has the attribute' ); + 'no longer has the attribute' ); ok( !$page->can($_), "... our class no longer has the $_ method" ) for qw[ counter diff --git a/t/070_native_traits/201_trait_counter.t b/t/070_native_traits/201_trait_counter.t index 432ab29..8b81920 100644 --- a/t/070_native_traits/201_trait_counter.t +++ b/t/070_native_traits/201_trait_counter.t @@ -34,28 +34,28 @@ can_ok( $page, $_ ) for qw[ set_counter ]; -is( $page->counter, 0, '... got the default value' ); +is( $page->counter, 0, 'got the default value' ); $page->inc_counter; -is( $page->counter, 1, '... got the incremented value' ); +is( $page->counter, 1, 'got the incremented value' ); $page->inc_counter; -is( $page->counter, 2, '... got the incremented value (again)' ); +is( $page->counter, 2, 'got the incremented value (again)' ); $page->dec_counter; -is( $page->counter, 1, '... got the decremented value' ); +is( $page->counter, 1, 'got the decremented value' ); $page->reset_counter; -is( $page->counter, 0, '... got the original value' ); +is( $page->counter, 0, 'got the original value' ); $page->set_counter(5); -is( $page->counter, 5, '... set the value' ); +is( $page->counter, 5, 'set the value' ); $page->inc_counter(2); -is( $page->counter, 7, '... increment by arg' ); +is( $page->counter, 7, 'increment by arg' ); $page->dec_counter(5); -is( $page->counter, 2, '... decrement by arg' ); +is( $page->counter, 2, 'decrement by arg' ); # check the meta .. @@ -63,7 +63,7 @@ my $counter = $page->meta->get_attribute('counter'); does_ok( $counter, 'Moose::Meta::Attribute::Native::Trait::Counter' ); is( $counter->type_constraint->name, 'Int', - '... got the expected type constraint' ); + 'got the expected type constraint' ); is_deeply( $counter->handles, @@ -73,6 +73,6 @@ is_deeply( reset_counter => 'reset', set_counter => 'set' }, - '... got the right handles methods' + 'got the right handles methods' ); diff --git a/t/070_native_traits/202_trait_array.t b/t/070_native_traits/202_trait_array.t index 25afb92..3272c7a 100644 --- a/t/070_native_traits/202_trait_array.t +++ b/t/070_native_traits/202_trait_array.t @@ -59,72 +59,72 @@ can_ok( $stuff, $_ ) for qw[ option_accessor ]; -is_deeply( $stuff->options, [ 10, 12 ], '... got options' ); +is_deeply( $stuff->options, [ 10, 12 ], 'got options' ); -ok( !$stuff->has_no_options, '... we have options' ); -is( $stuff->num_options, 2, '... got 2 options' ); +ok( !$stuff->has_no_options, 'we have options' ); +is( $stuff->num_options, 2, 'got 2 options' ); -is( $stuff->remove_last_option, 12, '... removed the last option' ); -is( $stuff->remove_first_option, 10, '... removed the last option' ); +is( $stuff->remove_last_option, 12, 'removed the last option' ); +is( $stuff->remove_first_option, 10, 'removed the last option' ); -is_deeply( $stuff->options, [], '... no options anymore' ); +is_deeply( $stuff->options, [], 'no options anymore' ); -ok( $stuff->has_no_options, '... no options' ); -is( $stuff->num_options, 0, '... got no options' ); +ok( $stuff->has_no_options, 'no options' ); +is( $stuff->num_options, 0, 'got no options' ); lives_ok { $stuff->add_options( 1, 2, 3 ); } -'... set the option okay'; +'set the option okay'; -is_deeply( $stuff->options, [ 1, 2, 3 ], '... got options now' ); +is_deeply( $stuff->options, [ 1, 2, 3 ], 'got options now' ); -ok( !$stuff->has_no_options, '... has options' ); -is( $stuff->num_options, 3, '... got 3 options' ); +ok( !$stuff->has_no_options, 'has options' ); +is( $stuff->num_options, 3, 'got 3 options' ); -is( $stuff->get_option_at(0), 1, '... get option at index 0' ); -is( $stuff->get_option_at(1), 2, '... get option at index 1' ); -is( $stuff->get_option_at(2), 3, '... get option at index 2' ); +is( $stuff->get_option_at(0), 1, 'get option at index 0' ); +is( $stuff->get_option_at(1), 2, 'get option at index 1' ); +is( $stuff->get_option_at(2), 3, 'get option at index 2' ); lives_ok { $stuff->set_option_at( 1, 100 ); } -'... set the option okay'; +'set the option okay'; -is( $stuff->get_option_at(1), 100, '... get option at index 1' ); +is( $stuff->get_option_at(1), 100, 'get option at index 1' ); lives_ok { $stuff->add_options( 10, 15 ); } -'... set the option okay'; +'set the option okay'; is_deeply( $stuff->options, [ 1, 100, 3, 10, 15 ], - '... got more options now' ); + 'got more options now' ); -is( $stuff->num_options, 5, '... got 5 options' ); +is( $stuff->num_options, 5, 'got 5 options' ); -is( $stuff->remove_last_option, 15, '... removed the last option' ); +is( $stuff->remove_last_option, 15, 'removed the last option' ); -is( $stuff->num_options, 4, '... got 4 options' ); -is_deeply( $stuff->options, [ 1, 100, 3, 10 ], '... got diff options now' ); +is( $stuff->num_options, 4, 'got 4 options' ); +is_deeply( $stuff->options, [ 1, 100, 3, 10 ], 'got diff options now' ); lives_ok { $stuff->insert_options( 10, 20 ); } -'... set the option okay'; +'set the option okay'; -is( $stuff->num_options, 6, '... got 6 options' ); +is( $stuff->num_options, 6, 'got 6 options' ); is_deeply( $stuff->options, [ 10, 20, 1, 100, 3, 10 ], - '... got diff options now' ); + 'got diff options now' ); -is( $stuff->get_option_at(0), 10, '... get option at index 0' ); -is( $stuff->get_option_at(1), 20, '... get option at index 1' ); -is( $stuff->get_option_at(3), 100, '... get option at index 3' ); +is( $stuff->get_option_at(0), 10, 'get option at index 0' ); +is( $stuff->get_option_at(1), 20, 'get option at index 1' ); +is( $stuff->get_option_at(3), 100, 'get option at index 3' ); -is( $stuff->remove_first_option, 10, '... getting the first option' ); +is( $stuff->remove_first_option, 10, 'getting the first option' ); -is( $stuff->num_options, 5, '... got 5 options' ); -is( $stuff->get_option_at(0), 20, '... get option at index 0' ); +is( $stuff->num_options, 5, 'got 5 options' ); +is( $stuff->get_option_at(0), 20, 'get option at index 0' ); $stuff->clear_options; is_deeply( $stuff->options, [], "... clear options" ); @@ -143,7 +143,7 @@ $stuff->add_options( 5, 1, 2, 3 ); lives_ok { $stuff->descending_options(); } -'... curried sort in place lives ok'; +'curried sort in place lives ok'; is_deeply( $stuff->options, [ 5, 3, 2, 1 ], "... sort currying" ); @@ -156,12 +156,12 @@ $stuff->clear_options; lives_ok { $stuff->add_options('tree'); } -'... set the options okay'; +'set the options okay'; lives_ok { $stuff->add_options_with_speed( 'compatible', 'safe' ); } -'... add options with speed okay'; +'add options with speed okay'; is_deeply( $stuff->options, [qw/tree funrolls funbuns compatible safe/], @@ -171,7 +171,7 @@ is_deeply( lives_ok { $stuff->prepend_prerequisites_along_with(); } -'... add prerequisite options okay'; +'add prerequisite options okay'; $stuff->clear_options; $stuff->add_options( 1, 2 ); @@ -179,7 +179,7 @@ $stuff->add_options( 1, 2 ); lives_ok { $stuff->splice_options( 1, 0, 'foo' ); } -'... splice_options works'; +'splice_options works'; is_deeply( $stuff->options, [ 1, 'foo', 2 ], @@ -193,52 +193,52 @@ is( $stuff->option_accessor(1), 'foo++' ); #dies_ok { # $stuff->insert_options(undef); -#} '... could not add an undef where a string is expected'; +#} 'could not add an undef where a string is expected'; # #dies_ok { # $stuff->set_option(5, {}); -#} '... could not add a hash ref where a string is expected'; +#} 'could not add a hash ref where a string is expected'; dies_ok { Stuff->new( options => [ undef, 10, undef, 20 ] ); } -'... bad constructor params'; +'bad constructor params'; dies_ok { my $stuff = Stuff->new(); $stuff->add_options(undef); } -'... rejects push of an invalid type'; +'rejects push of an invalid type'; dies_ok { my $stuff = Stuff->new(); $stuff->insert_options(undef); } -'... rejects unshift of an invalid type'; +'rejects unshift of an invalid type'; dies_ok { my $stuff = Stuff->new(); $stuff->set_option_at( 0, undef ); } -'... rejects set of an invalid type'; +'rejects set of an invalid type'; dies_ok { my $stuff = Stuff->new(); $stuff->sort_in_place_options(undef); } -'... sort rejects arg of invalid type'; +'sort rejects arg of invalid type'; dies_ok { my $stuff = Stuff->new(); $stuff->option_accessor(); } -'... accessor rejects 0 args'; +'accessor rejects 0 args'; dies_ok { my $stuff = Stuff->new(); $stuff->option_accessor( 1, 2, 3 ); } -'... accessor rejects 3 args'; +'accessor rejects 3 args'; ## test the meta @@ -265,8 +265,8 @@ is_deeply( [ 'unshift' => 'first', 'second' ], 'descending_options' => [ 'sort_in_place' => $sort ], }, - '... got the right handles mapping' + 'got the right handles mapping' ); is( $options->type_constraint->type_parameter, 'Str', - '... got the right container type' ); + 'got the right container type' ); diff --git a/t/070_native_traits/203_trait_hash.t b/t/070_native_traits/203_trait_hash.t index a7d77f4..6d39a7e 100644 --- a/t/070_native_traits/203_trait_hash.t +++ b/t/070_native_traits/203_trait_hash.t @@ -49,45 +49,45 @@ can_ok( $stuff, $_ ) for qw[ option_accessor ]; -ok( $stuff->has_no_options, '... we have no options' ); -is( $stuff->num_options, 0, '... we have no options' ); +ok( $stuff->has_no_options, 'we have no options' ); +is( $stuff->num_options, 0, 'we have no options' ); -is_deeply( $stuff->options, {}, '... no options yet' ); -ok( !$stuff->has_option('foo'), '... we have no foo option' ); +is_deeply( $stuff->options, {}, 'no options yet' ); +ok( !$stuff->has_option('foo'), 'we have no foo option' ); lives_ok { $stuff->set_option( foo => 'bar' ); } -'... set the option okay'; +'set the option okay'; -ok( $stuff->is_defined('foo'), '... foo is defined' ); +ok( $stuff->is_defined('foo'), 'foo is defined' ); -ok( !$stuff->has_no_options, '... we have options' ); -is( $stuff->num_options, 1, '... we have 1 option(s)' ); -ok( $stuff->has_option('foo'), '... we have a foo option' ); -is_deeply( $stuff->options, { foo => 'bar' }, '... got options now' ); +ok( !$stuff->has_no_options, 'we have options' ); +is( $stuff->num_options, 1, 'we have 1 option(s)' ); +ok( $stuff->has_option('foo'), 'we have a foo option' ); +is_deeply( $stuff->options, { foo => 'bar' }, 'got options now' ); lives_ok { $stuff->set_option( bar => 'baz' ); } -'... set the option okay'; +'set the option okay'; -is( $stuff->num_options, 2, '... we have 2 option(s)' ); +is( $stuff->num_options, 2, 'we have 2 option(s)' ); is_deeply( $stuff->options, { foo => 'bar', bar => 'baz' }, - '... got more options now' ); + 'got more options now' ); -is( $stuff->get_option('foo'), 'bar', '... got the right option' ); +is( $stuff->get_option('foo'), 'bar', 'got the right option' ); is_deeply( [ $stuff->get_option(qw(foo bar)) ], [qw(bar baz)], "get multiple options at once" ); is( scalar($stuff->get_option(qw( foo bar) )), "baz", - '... got last option in scalar context'); + 'got last option in scalar context'); lives_ok { $stuff->set_option( oink => "blah", xxy => "flop" ); } -'... set the option okay'; +'set the option okay'; is( $stuff->num_options, 4, "4 options" ); is_deeply( [ $stuff->get_option(qw(foo bar oink xxy)) ], @@ -96,15 +96,15 @@ is_deeply( [ $stuff->get_option(qw(foo bar oink xxy)) ], lives_ok { $stuff->delete_option('bar'); } -'... deleted the option okay'; +'deleted the option okay'; lives_ok { $stuff->delete_option('oink','xxy'); } -'... deleted multiple option okay'; +'deleted multiple option okay'; -is( $stuff->num_options, 1, '... we have 1 option(s)' ); -is_deeply( $stuff->options, { foo => 'bar' }, '... got more options now' ); +is( $stuff->num_options, 1, 'we have 1 option(s)' ); +is_deeply( $stuff->options, { foo => 'bar' }, 'got more options now' ); $stuff->clear_options; @@ -113,28 +113,28 @@ is_deeply( $stuff->options, {}, "... cleared options" ); lives_ok { $stuff->quantity(4); } -'... options added okay with defaults'; +'options added okay with defaults'; is( $stuff->quantity, 4, 'reader part of curried accessor works' ); -is_deeply( $stuff->options, { quantity => 4 }, '... returns what we expect' ); +is_deeply( $stuff->options, { quantity => 4 }, 'returns what we expect' ); lives_ok { Stuff->new( options => { foo => 'BAR' } ); } -'... good constructor params'; +'good constructor params'; ## check some errors dies_ok { $stuff->set_option( bar => {} ); } -'... could not add a hash ref where an string is expected'; +'could not add a hash ref where an string is expected'; dies_ok { Stuff->new( options => { foo => [] } ); } -'... bad constructor params'; +'bad constructor params'; ## test the meta @@ -157,18 +157,18 @@ is_deeply( 'options_elements' => 'elements', 'quantity' => [ accessor => 'quantity' ], }, - '... got the right handles mapping' + 'got the right handles mapping' ); is( $options->type_constraint->type_parameter, 'Str', - '... got the right container type' ); + 'got the right container type' ); $stuff->set_option( oink => "blah", xxy => "flop" ); my @key_value = sort{ $a->[0] cmp $b->[0] } $stuff->key_value; is_deeply( \@key_value, [ sort{ $a->[0] cmp $b->[0] } [ 'xxy', 'flop' ], [ 'quantity', 4 ], [ 'oink', 'blah' ] ], - '... got the right key value pairs' + 'got the right key value pairs' ) or do{ require Data::Dumper; diag(Data::Dumper::Dumper(\@key_value)) }; my %options_elements = $stuff->options_elements; @@ -179,5 +179,5 @@ is_deeply( 'quantity' => 4, 'xxy' => 'flop' }, - '... got the right hash elements' + 'got the right hash elements' ); diff --git a/t/070_native_traits/204_trait_number.t b/t/070_native_traits/204_trait_number.t index 48736f8..96e753f 100644 --- a/t/070_native_traits/204_trait_number.t +++ b/t/070_native_traits/204_trait_number.t @@ -107,6 +107,6 @@ is_deeply( odd => [ mod => 2 ], cut_in_half => [ div => 2 ], }, - '... got the right handles mapping' + 'got the right handles mapping' ); diff --git a/t/070_native_traits/205_trait_list.t b/t/070_native_traits/205_trait_list.t index 8e6a37a..a50dab3 100644 --- a/t/070_native_traits/205_trait_list.t +++ b/t/070_native_traits/205_trait_list.t @@ -68,40 +68,40 @@ can_ok( $stuff, $_ ) for qw[ product ]; -is_deeply( $stuff->_options, [ 1 .. 10 ], '... got options' ); +is_deeply( $stuff->_options, [ 1 .. 10 ], 'got options' ); -ok( !$stuff->has_no_options, '... we have options' ); -is( $stuff->num_options, 10, '... got 2 options' ); -cmp_ok( $stuff->get_option_at(0), '==', 1, '... get option 0' ); +ok( !$stuff->has_no_options, 'we have options' ); +is( $stuff->num_options, 10, 'got 2 options' ); +cmp_ok( $stuff->get_option_at(0), '==', 1, 'get option 0' ); is_deeply( [ $stuff->filter_options( sub { $_ % 2 == 0 } ) ], [ 2, 4, 6, 8, 10 ], - '... got the right filtered values' + 'got the right filtered values' ); is_deeply( [ $stuff->map_options( sub { $_ * 2 } ) ], [ 2, 4, 6, 8, 10, 12, 14, 16, 18, 20 ], - '... got the right mapped values' + 'got the right mapped values' ); is( $stuff->find_option( sub { $_ % 2 == 0 } ), 2, '.. found the right option' ); -is_deeply( [ $stuff->options ], [ 1 .. 10 ], '... got the list of options' ); +is_deeply( [ $stuff->options ], [ 1 .. 10 ], 'got the list of options' ); is( $stuff->join_options(':'), '1:2:3:4:5:6:7:8:9:10', - '... joined the list of options by :' ); + 'joined the list of options by :' ); is_deeply( [ $stuff->sorted_options ], [ sort ( 1 .. 10 ) ], - '... got sorted options (default sort order)' + 'got sorted options (default sort order)' ); is_deeply( [ $stuff->sorted_options( sub { $_[1] <=> $_[0] } ) ], [ sort { $b <=> $a } ( 1 .. 10 ) ], - '... got sorted options (descending sort order) ' + 'got sorted options (descending sort order) ' ); throws_ok { $stuff->sorted_options('foo') } @@ -154,14 +154,14 @@ is_deeply( 'descending' => [ sort => $sort ], 'product' => [ reduce => $prod ], }, - '... got the right handles mapping' + 'got the right handles mapping' ); is( $options->type_constraint->type_parameter, 'Int', - '... got the right container type' ); + 'got the right container type' ); dies_ok { $stuff->sort_in_place_options(undef); } -'... sort rejects arg of invalid type'; +'sort rejects arg of invalid type'; diff --git a/t/070_native_traits/207_trait_string.t b/t/070_native_traits/207_trait_string.t index 7c85ae8..0a5cf9a 100644 --- a/t/070_native_traits/207_trait_string.t +++ b/t/070_native_traits/207_trait_string.t @@ -36,17 +36,17 @@ my $uc; my $page = MyHomePage->new(); isa_ok( $page, 'MyHomePage' ); -is( $page->string, '', '... got the default value' ); -is( $page->length_string, 0,'... length is zero' ); +is( $page->string, '', 'got the default value' ); +is( $page->length_string, 0,'length is zero' ); $page->string('a'); -is( $page->length_string, 1,'... new string has length of one' ); +is( $page->length_string, 1,'new string has length of one' ); $page->inc_string; -is( $page->string, 'b', '... got the incremented value' ); +is( $page->string, 'b', 'got the incremented value' ); $page->inc_string; -is( $page->string, 'c', '... got the incremented value (again)' ); +is( $page->string, 'c', 'got the incremented value (again)' ); $page->append_string("foo$/"); is( $page->string, "cfoo$/", 'appended to string' ); @@ -92,7 +92,7 @@ does_ok( $string, 'Moose::Meta::Attribute::Native::Trait::String' ); is( $string->type_constraint->name, 'Str', - '... got the expected type constraint' + 'got the expected type constraint' ); is_deeply( @@ -111,6 +111,6 @@ is_deeply( capitalize_last => [ replace => qr/(.)$/, $uc ], invalid_number => [ match => qr/\D/ ], }, - '... got the right handles methods' + 'got the right handles methods' ); diff --git a/t/100_bugs/005_inline_reader_bug.t b/t/100_bugs/005_inline_reader_bug.t index cc0c01e..f76974c 100644 --- a/t/100_bugs/005_inline_reader_bug.t +++ b/t/100_bugs/005_inline_reader_bug.t @@ -26,6 +26,6 @@ test makes sure it does not creep back in. lazy => 1, default => 10, ); - } '... this didnt die'; + } 'this didnt die'; } diff --git a/t/100_bugs/006_handles_foreign_class_bug.t b/t/100_bugs/006_handles_foreign_class_bug.t index dc162f5..f25d4e2 100644 --- a/t/100_bugs/006_handles_foreign_class_bug.t +++ b/t/100_bugs/006_handles_foreign_class_bug.t @@ -28,17 +28,17 @@ use Test::Exception; default => sub { Foo->new() }, handles => qr/^a$/, ); - } '... can create the attribute with delegations'; + } 'can create the attribute with delegations'; } my $bar; lives_ok { $bar = Bar->new; -} '... created the object ok'; +} 'created the object ok'; isa_ok($bar, 'Bar'); -is($bar->a, 'Foo::a', '... got the right delgated value'); +is($bar->a, 'Foo::a', 'got the right delgated value'); my @w; $SIG{__WARN__} = sub { push @w, "@_" }; @@ -54,7 +54,7 @@ $SIG{__WARN__} = sub { push @w, "@_" }; default => sub { Foo->new() }, handles => qr/.*/, ); - } '... can create the attribute with delegations'; + } 'can create the attribute with delegations'; } @@ -64,10 +64,10 @@ is(@w, 0, "no warnings"); my $baz; lives_ok { $baz = Baz->new; -} '... created the object ok'; +} 'created the object ok'; isa_ok($baz, 'Baz'); -is($baz->a, 'Foo::a', '... got the right delgated value'); +is($baz->a, 'Foo::a', 'got the right delgated value'); @@ -87,7 +87,7 @@ is($baz->a, 'Foo::a', '... got the right delgated value'); default => sub { Foo->new() }, handles => [qw(a new)], ); - } '... can create the attribute with delegations'; + } 'can create the attribute with delegations'; } @@ -103,9 +103,9 @@ is($baz->a, 'Foo::a', '... got the right delgated value'); my $blart; lives_ok { $blart = Blart->new; -} '... created the object ok'; +} 'created the object ok'; isa_ok($blart, 'Blart'); -is($blart->a, 'Foo::a', '... got the right delgated value'); +is($blart->a, 'Foo::a', 'got the right delgated value'); diff --git a/t/100_bugs/009_augment_recursion_bug.t b/t/100_bugs/009_augment_recursion_bug.t index 11cd728..e573673 100644 --- a/t/100_bugs/009_augment_recursion_bug.t +++ b/t/100_bugs/009_augment_recursion_bug.t @@ -45,5 +45,5 @@ then we may have an infinite loop. is($baz->foo, 'Foo::foo(Baz::foo and Foo::foo())', - '... got the right value for 1 augmented subclass calling non-augmented subclass'); + 'got the right value for 1 augmented subclass calling non-augmented subclass'); diff --git a/t/100_bugs/016_inheriting_from_roles.t b/t/100_bugs/016_inheriting_from_roles.t index aa6a86b..ecf4125 100644 --- a/t/100_bugs/016_inheriting_from_roles.t +++ b/t/100_bugs/016_inheriting_from_roles.t @@ -19,5 +19,5 @@ use Test::Exception; ::throws_ok { extends 'My::Role'; } qr/You cannot inherit from a Moose Role \(My\:\:Role\)/, - '... this croaks correctly'; + 'this croaks correctly'; } diff --git a/t/100_bugs/017_type_constraint_messages.t b/t/100_bugs/017_type_constraint_messages.t index e5bee1e..0ead51e 100644 --- a/t/100_bugs/017_type_constraint_messages.t +++ b/t/100_bugs/017_type_constraint_messages.t @@ -57,17 +57,17 @@ throws_ok { $foo->ar( [] ); } qr/Attribute \(ar\) does not pass the type constraint because: ref: ARRAY/, - '... got the right error message'; + 'got the right error message'; throws_ok { $foo->obj($foo); # Doh! } qr/Attribute \(obj\) does not pass the type constraint because: Well it is an object/, - '... got the right error message'; + 'got the right error message'; throws_ok { $foo->nt($foo); # scalar } qr/Attribute \(nt\) does not pass the type constraint because: blessed/, - '... got the right error message'; + 'got the right error message'; diff --git a/t/100_bugs/018_immutable_metaclass_does_role.t b/t/100_bugs/018_immutable_metaclass_does_role.t index eccb1d9..0e5f06a 100644 --- a/t/100_bugs/018_immutable_metaclass_does_role.t +++ b/t/100_bugs/018_immutable_metaclass_does_role.t @@ -31,62 +31,62 @@ BEGIN { my $mc = MyMetaclass->initialize('MyClass'); isa_ok($mc, 'MyMetaclass'); -ok($mc->meta->does_role('MyRole'), '... the metaclass does the role'); +ok($mc->meta->does_role('MyRole'), 'the metaclass does the role'); -is(MyClass->meta, $mc, '... these metas are the same thing'); -is(MyClass->meta->meta, $mc->meta, '... these meta-metas are the same thing'); +is(MyClass->meta, $mc, 'these metas are the same thing'); +is(MyClass->meta->meta, $mc->meta, 'these meta-metas are the same thing'); my $a = MyClass->new; ok( $a->meta->meta->does_role('MyRole'), 'metaclass does MyRole' ); -is( $a->meta->foo, 'i am foo', '... foo method returns expected value' ); +is( $a->meta->foo, 'i am foo', 'foo method returns expected value' ); ok( MyClass->meta->meta->does_role('MyRole'), 'metaclass does MyRole' ); -is( MyClass->meta->foo, 'i am foo', '... foo method returns expected value' ); +is( MyClass->meta->foo, 'i am foo', 'foo method returns expected value' ); lives_ok { MyClass->meta->make_immutable; -} '... make MyClass immutable okay'; +} 'make MyClass immutable okay'; -is(MyClass->meta, $mc, '... these metas are still the same thing'); -is(MyClass->meta->meta, $mc->meta, '... these meta-metas are the same thing'); +is(MyClass->meta, $mc, 'these metas are still the same thing'); +is(MyClass->meta->meta, $mc->meta, 'these meta-metas are the same thing'); ok( $a->meta->meta->does_role('MyRole'), 'metaclass does MyRole' ); -is( $a->meta->foo, 'i am foo', '... foo method returns expected value' ); +is( $a->meta->foo, 'i am foo', 'foo method returns expected value' ); ok( MyClass->meta->meta->does_role('MyRole'), 'metaclass does MyRole' ); -is( MyClass->meta->foo, 'i am foo', '... foo method returns expected value' ); +is( MyClass->meta->foo, 'i am foo', 'foo method returns expected value' ); lives_ok { MyClass->meta->make_mutable; -} '... make MyClass mutable okay'; +} 'make MyClass mutable okay'; -is(MyClass->meta, $mc, '... these metas are still the same thing'); -is(MyClass->meta->meta, $mc->meta, '... these meta-metas are the same thing'); +is(MyClass->meta, $mc, 'these metas are still the same thing'); +is(MyClass->meta->meta, $mc->meta, 'these meta-metas are the same thing'); ok( $a->meta->meta->does_role('MyRole'), 'metaclass does MyRole' ); -is( $a->meta->foo, 'i am foo', '... foo method returns expected value' ); +is( $a->meta->foo, 'i am foo', 'foo method returns expected value' ); ok( MyClass->meta->meta->does_role('MyRole'), 'metaclass does MyRole' ); -is( MyClass->meta->foo, 'i am foo', '... foo method returns expected value' ); +is( MyClass->meta->foo, 'i am foo', 'foo method returns expected value' ); lives_ok { MyMetaclass->meta->make_immutable; -} '... make MyClass immutable okay'; +} 'make MyClass immutable okay'; -is(MyClass->meta, $mc, '... these metas are still the same thing'); -is(MyClass->meta->meta, $mc->meta, '... these meta-metas are the same thing'); +is(MyClass->meta, $mc, 'these metas are still the same thing'); +is(MyClass->meta->meta, $mc->meta, 'these meta-metas are the same thing'); ok( $a->meta->meta->does_role('MyRole'), 'metaclass does MyRole' ); -is( $a->meta->foo, 'i am foo', '... foo method returns expected value' ); +is( $a->meta->foo, 'i am foo', 'foo method returns expected value' ); ok( MyClass->meta->meta->does_role('MyRole'), 'metaclass does MyRole' ); -is( MyClass->meta->foo, 'i am foo', '... foo method returns expected value' ); +is( MyClass->meta->foo, 'i am foo', 'foo method returns expected value' ); lives_ok { MyClass->meta->make_immutable; -} '... make MyClass immutable okay'; +} 'make MyClass immutable okay'; -is(MyClass->meta, $mc, '... these metas are still the same thing'); -is(MyClass->meta->meta, $mc->meta, '... these meta-metas are the same thing'); +is(MyClass->meta, $mc, 'these metas are still the same thing'); +is(MyClass->meta->meta, $mc->meta, 'these meta-metas are the same thing'); ok( $a->meta->meta->does_role('MyRole'), 'metaclass does MyRole' ); -is( $a->meta->foo, 'i am foo', '... foo method returns expected value' ); +is( $a->meta->foo, 'i am foo', 'foo method returns expected value' ); ok( MyClass->meta->meta->does_role('MyRole'), 'metaclass does MyRole' ); -is( MyClass->meta->foo, 'i am foo', '... foo method returns expected value' ); +is( MyClass->meta->foo, 'i am foo', 'foo method returns expected value' ); diff --git a/t/200_examples/001_example.t b/t/200_examples/001_example.t index d7dd836..3c482e1 100644 --- a/t/200_examples/001_example.t +++ b/t/200_examples/001_example.t @@ -89,18 +89,18 @@ use Test::Exception; my $no_more_than_10 = Constraint::NoMoreThan->new(value => 10); isa_ok($no_more_than_10, 'Constraint::NoMoreThan'); -ok($no_more_than_10->does('Constraint'), '... Constraint::NoMoreThan does Constraint'); +ok($no_more_than_10->does('Constraint'), 'Constraint::NoMoreThan does Constraint'); -ok(!defined($no_more_than_10->validate(1)), '... validated correctly'); -is($no_more_than_10->validate(11), 'must be no more than 10', '... validation failed correctly'); +ok(!defined($no_more_than_10->validate(1)), 'validated correctly'); +is($no_more_than_10->validate(11), 'must be no more than 10', 'validation failed correctly'); my $at_least_10 = Constraint::AtLeast->new(value => 10); isa_ok($at_least_10, 'Constraint::AtLeast'); -ok($at_least_10->does('Constraint'), '... Constraint::AtLeast does Constraint'); +ok($at_least_10->does('Constraint'), 'Constraint::AtLeast does Constraint'); -ok(!defined($at_least_10->validate(11)), '... validated correctly'); -is($at_least_10->validate(1), 'must be at least 10', '... validation failed correctly'); +ok(!defined($at_least_10->validate(11)), 'validated correctly'); +is($at_least_10->validate(1), 'must be at least 10', 'validation failed correctly'); # onlength @@ -108,21 +108,21 @@ my $no_more_than_10_chars = Constraint::LengthNoMoreThan->new(value => 10, units isa_ok($no_more_than_10_chars, 'Constraint::LengthNoMoreThan'); isa_ok($no_more_than_10_chars, 'Constraint::NoMoreThan'); -ok($no_more_than_10_chars->does('Constraint'), '... Constraint::LengthNoMoreThan does Constraint'); -ok($no_more_than_10_chars->does('Constraint::OnLength'), '... Constraint::LengthNoMoreThan does Constraint::OnLength'); +ok($no_more_than_10_chars->does('Constraint'), 'Constraint::LengthNoMoreThan does Constraint'); +ok($no_more_than_10_chars->does('Constraint::OnLength'), 'Constraint::LengthNoMoreThan does Constraint::OnLength'); -ok(!defined($no_more_than_10_chars->validate('foo')), '... validated correctly'); +ok(!defined($no_more_than_10_chars->validate('foo')), 'validated correctly'); is($no_more_than_10_chars->validate('foooooooooo'), 'must be no more than 10 chars', - '... validation failed correctly'); + 'validation failed correctly'); my $at_least_10_chars = Constraint::LengthAtLeast->new(value => 10, units => 'chars'); isa_ok($at_least_10_chars, 'Constraint::LengthAtLeast'); isa_ok($at_least_10_chars, 'Constraint::AtLeast'); -ok($at_least_10_chars->does('Constraint'), '... Constraint::LengthAtLeast does Constraint'); -ok($at_least_10_chars->does('Constraint::OnLength'), '... Constraint::LengthAtLeast does Constraint::OnLength'); +ok($at_least_10_chars->does('Constraint'), 'Constraint::LengthAtLeast does Constraint'); +ok($at_least_10_chars->does('Constraint::OnLength'), 'Constraint::LengthAtLeast does Constraint::OnLength'); -ok(!defined($at_least_10_chars->validate('barrrrrrrrr')), '... validated correctly'); -is($at_least_10_chars->validate('bar'), 'must be at least 10 chars', '... validation failed correctly'); +ok(!defined($at_least_10_chars->validate('barrrrrrrrr')), 'validated correctly'); +is($at_least_10_chars->validate('bar'), 'must be at least 10 chars', 'validation failed correctly'); diff --git a/t/200_examples/002_example_Moose_POOP.t b/t/200_examples/002_example_Moose_POOP.t index 68ed49a..1a68489 100644 --- a/t/200_examples/002_example_Moose_POOP.t +++ b/t/200_examples/002_example_Moose_POOP.t @@ -218,7 +218,7 @@ BEGIN { is(Moose::POOP::Object->meta->instance_metaclass, 'Moose::POOP::Meta::Instance', - '... got the right instance metaclass name'); + 'got the right instance metaclass name'); isa_ok(Moose::POOP::Object->meta->get_meta_instance, 'Moose::POOP::Meta::Instance'); @@ -232,7 +232,7 @@ BEGIN { is($base->meta->instance_metaclass, 'Moose::POOP::Meta::Instance', - '... got the right instance metaclass name'); + 'got the right instance metaclass name'); isa_ok($base->meta->get_meta_instance, 'Moose::POOP::Meta::Instance'); } @@ -254,14 +254,14 @@ my $article_ref; status => 'pending' ); - } '... created my article successfully'; + } 'created my article successfully'; isa_ok($article, 'Newswriter::Article'); isa_ok($article, 'Moose::POOP::Object'); lives_ok { $article->start_date(DateTime->new(year => 2006, month => 6, day => 10)); $article->end_date(DateTime->new(year => 2006, month => 6, day => 17)); - } '... add the article date-time stuff'; + } 'add the article date-time stuff'; ## check some meta stuff @@ -271,31 +271,31 @@ my $article_ref; is($article->meta->instance_metaclass, 'Moose::POOP::Meta::Instance', - '... got the right instance metaclass name'); + 'got the right instance metaclass name'); isa_ok($article->meta->get_meta_instance, 'Moose::POOP::Meta::Instance'); - ok($article->oid, '... got a oid for the article'); + ok($article->oid, 'got a oid for the article'); $article_oid = $article->oid; $article_ref = "$article"; is($article->headline, 'Home Office Redecorated', - '... got the right headline'); + 'got the right headline'); is($article->summary, 'The home office was recently redecorated to match the new company colors', - '... got the right summary'); - is($article->article, '...', '... got the right article'); + 'got the right summary'); + is($article->article, '...', 'got the right article'); isa_ok($article->start_date, 'DateTime'); isa_ok($article->end_date, 'DateTime'); isa_ok($article->author, 'Newswriter::Author'); - is($article->author->first_name, 'Truman', '... got the right author first name'); - is($article->author->last_name, 'Capote', '... got the right author last name'); + is($article->author->first_name, 'Truman', 'got the right author first name'); + is($article->author->last_name, 'Capote', 'got the right author last name'); - is($article->status, 'pending', '... got the right status'); + is($article->status, 'pending', 'got the right status'); } Moose::POOP::Meta::Instance->_reload_db(); @@ -317,7 +317,7 @@ my $article2_ref; status => 'posted' ); - } '... created my article successfully'; + } 'created my article successfully'; isa_ok($article2, 'Newswriter::Article'); isa_ok($article2, 'Moose::POOP::Object'); @@ -326,57 +326,57 @@ my $article2_ref; is($article2->headline, 'Company wins Lottery', - '... got the right headline'); + 'got the right headline'); is($article2->summary, 'An email was received today that informed the company we have won the lottery', - '... got the right summary'); - is($article2->article, 'WoW', '... got the right article'); + 'got the right summary'); + is($article2->article, 'WoW', 'got the right article'); - ok(!$article2->start_date, '... these two dates are unassigned'); - ok(!$article2->end_date, '... these two dates are unassigned'); + ok(!$article2->start_date, 'these two dates are unassigned'); + ok(!$article2->end_date, 'these two dates are unassigned'); isa_ok($article2->author, 'Newswriter::Author'); - is($article2->author->first_name, 'Katie', '... got the right author first name'); - is($article2->author->last_name, 'Couric', '... got the right author last name'); + is($article2->author->first_name, 'Katie', 'got the right author first name'); + is($article2->author->last_name, 'Couric', 'got the right author last name'); - is($article2->status, 'posted', '... got the right status'); + is($article2->status, 'posted', 'got the right status'); ## orig-article my $article; lives_ok { $article = Newswriter::Article->new(oid => $article_oid); - } '... (re)-created my article successfully'; + } '(re)-created my article successfully'; isa_ok($article, 'Newswriter::Article'); isa_ok($article, 'Moose::POOP::Object'); - is($article->oid, $article_oid, '... got a oid for the article'); - isnt($article_ref, "$article", '... got a new article instance'); + is($article->oid, $article_oid, 'got a oid for the article'); + isnt($article_ref, "$article", 'got a new article instance'); is($article->headline, 'Home Office Redecorated', - '... got the right headline'); + 'got the right headline'); is($article->summary, 'The home office was recently redecorated to match the new company colors', - '... got the right summary'); - is($article->article, '...', '... got the right article'); + 'got the right summary'); + is($article->article, '...', 'got the right article'); isa_ok($article->start_date, 'DateTime'); isa_ok($article->end_date, 'DateTime'); isa_ok($article->author, 'Newswriter::Author'); - is($article->author->first_name, 'Truman', '... got the right author first name'); - is($article->author->last_name, 'Capote', '... got the right author last name'); + is($article->author->first_name, 'Truman', 'got the right author first name'); + is($article->author->last_name, 'Capote', 'got the right author last name'); lives_ok { $article->author->first_name('Dan'); $article->author->last_name('Rather'); - } '... changed the value ok'; + } 'changed the value ok'; - is($article->author->first_name, 'Dan', '... got the changed author first name'); - is($article->author->last_name, 'Rather', '... got the changed author last name'); + is($article->author->first_name, 'Dan', 'got the changed author first name'); + is($article->author->last_name, 'Rather', 'got the changed author last name'); - is($article->status, 'pending', '... got the right status'); + is($article->status, 'pending', 'got the right status'); } Moose::POOP::Meta::Instance->_reload_db(); @@ -385,56 +385,56 @@ Moose::POOP::Meta::Instance->_reload_db(); my $article; lives_ok { $article = Newswriter::Article->new(oid => $article_oid); - } '... (re)-created my article successfully'; + } '(re)-created my article successfully'; isa_ok($article, 'Newswriter::Article'); isa_ok($article, 'Moose::POOP::Object'); - is($article->oid, $article_oid, '... got a oid for the article'); - isnt($article_ref, "$article", '... got a new article instance'); + is($article->oid, $article_oid, 'got a oid for the article'); + isnt($article_ref, "$article", 'got a new article instance'); is($article->headline, 'Home Office Redecorated', - '... got the right headline'); + 'got the right headline'); is($article->summary, 'The home office was recently redecorated to match the new company colors', - '... got the right summary'); - is($article->article, '...', '... got the right article'); + 'got the right summary'); + is($article->article, '...', 'got the right article'); isa_ok($article->start_date, 'DateTime'); isa_ok($article->end_date, 'DateTime'); isa_ok($article->author, 'Newswriter::Author'); - is($article->author->first_name, 'Dan', '... got the changed author first name'); - is($article->author->last_name, 'Rather', '... got the changed author last name'); + is($article->author->first_name, 'Dan', 'got the changed author first name'); + is($article->author->last_name, 'Rather', 'got the changed author last name'); - is($article->status, 'pending', '... got the right status'); + is($article->status, 'pending', 'got the right status'); my $article2; lives_ok { $article2 = Newswriter::Article->new(oid => $article2_oid); - } '... (re)-created my article successfully'; + } '(re)-created my article successfully'; isa_ok($article2, 'Newswriter::Article'); isa_ok($article2, 'Moose::POOP::Object'); - is($article2->oid, $article2_oid, '... got a oid for the article'); - isnt($article2_ref, "$article2", '... got a new article instance'); + is($article2->oid, $article2_oid, 'got a oid for the article'); + isnt($article2_ref, "$article2", 'got a new article instance'); is($article2->headline, 'Company wins Lottery', - '... got the right headline'); + 'got the right headline'); is($article2->summary, 'An email was received today that informed the company we have won the lottery', - '... got the right summary'); - is($article2->article, 'WoW', '... got the right article'); + 'got the right summary'); + is($article2->article, 'WoW', 'got the right article'); - ok(!$article2->start_date, '... these two dates are unassigned'); - ok(!$article2->end_date, '... these two dates are unassigned'); + ok(!$article2->start_date, 'these two dates are unassigned'); + ok(!$article2->end_date, 'these two dates are unassigned'); isa_ok($article2->author, 'Newswriter::Author'); - is($article2->author->first_name, 'Katie', '... got the right author first name'); - is($article2->author->last_name, 'Couric', '... got the right author last name'); + is($article2->author->first_name, 'Katie', 'got the right author first name'); + is($article2->author->last_name, 'Couric', 'got the right author last name'); - is($article2->status, 'posted', '... got the right status'); + is($article2->status, 'posted', 'got the right status'); } diff --git a/t/200_examples/003_example.t b/t/200_examples/003_example.t index 2e081bb..e9e194c 100644 --- a/t/200_examples/003_example.t +++ b/t/200_examples/003_example.t @@ -83,14 +83,14 @@ sub Y { ::lives_ok { with 'List', 'List::Immutable'; - } '... successfully composed roles together'; + } 'successfully composed roles together'; package My::List2; use Moose; ::lives_ok { with 'List::Immutable', 'List'; - } '... successfully composed roles together'; + } 'successfully composed roles together'; } @@ -98,60 +98,60 @@ sub Y { my $coll = My::List1->new; isa_ok($coll, 'My::List1'); - ok($coll->does('List'), '... $coll does List'); - ok($coll->does('List::Immutable'), '... $coll does List::Immutable'); + ok($coll->does('List'), '$coll does List'); + ok($coll->does('List::Immutable'), '$coll does List::Immutable'); - ok($coll->is_empty, '... we have an empty collection'); - is($coll->length, 0, '... we have a length of 1 for the collection'); + ok($coll->is_empty, 'we have an empty collection'); + is($coll->length, 0, 'we have a length of 1 for the collection'); } { my $coll = My::List2->new; isa_ok($coll, 'My::List2'); - ok($coll->does('List'), '... $coll does List'); - ok($coll->does('List::Immutable'), '... $coll does List::Immutable'); + ok($coll->does('List'), '$coll does List'); + ok($coll->does('List::Immutable'), '$coll does List::Immutable'); - ok($coll->is_empty, '... we have an empty collection'); - is($coll->length, 0, '... we have a length of 1 for the collection'); + ok($coll->is_empty, 'we have an empty collection'); + is($coll->length, 0, 'we have a length of 1 for the collection'); } { my $coll = My::List1->new('::' => [ 1 .. 10 ]); isa_ok($coll, 'My::List1'); - ok($coll->does('List'), '... $coll does List'); - ok($coll->does('List::Immutable'), '... $coll does List::Immutable'); + ok($coll->does('List'), '$coll does List'); + ok($coll->does('List::Immutable'), '$coll does List::Immutable'); - ok(!$coll->is_empty, '... we do not have an empty collection'); - is($coll->length, 10, '... we have a length of 10 for the collection'); + ok(!$coll->is_empty, 'we do not have an empty collection'); + is($coll->length, 10, 'we have a length of 10 for the collection'); - is($coll->print, '1, 2, 3, 4, 5, 6, 7, 8, 9, 10', '... got the right printed value'); + is($coll->print, '1, 2, 3, 4, 5, 6, 7, 8, 9, 10', 'got the right printed value'); my $coll2 = $coll->apply(sub { $_[0] * $_[0] }); isa_ok($coll2, 'My::List1'); - is($coll->print, '1, 2, 3, 4, 5, 6, 7, 8, 9, 10', '... original is still the same'); - is($coll2->print, '1, 4, 9, 16, 25, 36, 49, 64, 81, 100', '... new collection is changed'); + is($coll->print, '1, 2, 3, 4, 5, 6, 7, 8, 9, 10', 'original is still the same'); + is($coll2->print, '1, 4, 9, 16, 25, 36, 49, 64, 81, 100', 'new collection is changed'); } { my $coll = My::List2->new('::' => [ 1 .. 10 ]); isa_ok($coll, 'My::List2'); - ok($coll->does('List'), '... $coll does List'); - ok($coll->does('List::Immutable'), '... $coll does List::Immutable'); + ok($coll->does('List'), '$coll does List'); + ok($coll->does('List::Immutable'), '$coll does List::Immutable'); - ok(!$coll->is_empty, '... we do not have an empty collection'); - is($coll->length, 10, '... we have a length of 10 for the collection'); + ok(!$coll->is_empty, 'we do not have an empty collection'); + is($coll->length, 10, 'we have a length of 10 for the collection'); - is($coll->print, '1, 2, 3, 4, 5, 6, 7, 8, 9, 10', '... got the right printed value'); + is($coll->print, '1, 2, 3, 4, 5, 6, 7, 8, 9, 10', 'got the right printed value'); my $coll2 = $coll->apply(sub { $_[0] * $_[0] }); isa_ok($coll2, 'My::List2'); - is($coll->print, '1, 2, 3, 4, 5, 6, 7, 8, 9, 10', '... original is still the same'); - is($coll2->print, '1, 4, 9, 16, 25, 36, 49, 64, 81, 100', '... new collection is changed'); + is($coll->print, '1, 2, 3, 4, 5, 6, 7, 8, 9, 10', 'original is still the same'); + is($coll2->print, '1, 4, 9, 16, 25, 36, 49, 64, 81, 100', 'new collection is changed'); } diff --git a/t/200_examples/004_example_w_DCS.t b/t/200_examples/004_example_w_DCS.t index 335a45e..1a293b0 100644 --- a/t/200_examples/004_example_w_DCS.t +++ b/t/200_examples/004_example_w_DCS.t @@ -65,31 +65,31 @@ lives_ok { 'bar' => $hash_of_arrays_of_objs, 'baz' => $array_of_ints, ); -} '... construction succeeded'; +} 'construction succeeded'; isa_ok($foo, 'Foo'); -is_deeply($foo->bar, $hash_of_arrays_of_objs, '... got our value correctly'); -is_deeply($foo->baz, $array_of_ints, '... got our value correctly'); +is_deeply($foo->bar, $hash_of_arrays_of_objs, 'got our value correctly'); +is_deeply($foo->baz, $array_of_ints, 'got our value correctly'); dies_ok { $foo->bar([]); -} '... validation failed correctly'; +} 'validation failed correctly'; dies_ok { $foo->bar({ foo => 3 }); -} '... validation failed correctly'; +} 'validation failed correctly'; dies_ok { $foo->bar({ foo => [ 1, 2, 3 ] }); -} '... validation failed correctly'; +} 'validation failed correctly'; dies_ok { $foo->baz([ "foo" ]); -} '... validation failed correctly'; +} 'validation failed correctly'; dies_ok { $foo->baz({}); -} '... validation failed correctly'; +} 'validation failed correctly'; diff --git a/t/200_examples/005_example_w_TestDeep.t b/t/200_examples/005_example_w_TestDeep.t index 47bef7e..535901c 100644 --- a/t/200_examples/005_example_w_TestDeep.t +++ b/t/200_examples/005_example_w_TestDeep.t @@ -62,17 +62,17 @@ my $array_of_hashes = [ my $foo; lives_ok { $foo = Foo->new('bar' => $array_of_hashes); -} '... construction succeeded'; +} 'construction succeeded'; isa_ok($foo, 'Foo'); -is_deeply($foo->bar, $array_of_hashes, '... got our value correctly'); +is_deeply($foo->bar, $array_of_hashes, 'got our value correctly'); dies_ok { $foo->bar({}); -} '... validation failed correctly'; +} 'validation failed correctly'; dies_ok { $foo->bar([{ foo => 3 }]); -} '... validation failed correctly'; +} 'validation failed correctly'; diff --git a/t/200_examples/006_example_Protomoose.t b/t/200_examples/006_example_Protomoose.t index e0602e0..6e8ffa8 100644 --- a/t/200_examples/006_example_Protomoose.t +++ b/t/200_examples/006_example_Protomoose.t @@ -201,15 +201,15 @@ Well cause merlyn asked if it could :) foreach my $class (qw/ProtoMoose::Object Foo Bar/) { isa_ok($class->meta, 'ProtoMoose::Meta::Class', - '... got the right metaclass for ' . $class . ' ->'); + 'got the right metaclass for ' . $class . ' ->'); is($class->meta->instance_metaclass, 'ProtoMoose::Meta::Instance', - '... got the right instance meta for ' . $class); + 'got the right instance meta for ' . $class); is($class->meta->attribute_metaclass, 'ProtoMoose::Meta::Attribute', - '... got the right attribute meta for ' . $class); + 'got the right attribute meta for ' . $class); } ## ------------------------------------------------------------------ @@ -220,12 +220,12 @@ isa_ok($foo_prototype, 'Foo'); # set a value in the prototype $foo_prototype->bar(100); -is($foo_prototype->bar, 100, '... got the value stored in the prototype'); +is($foo_prototype->bar, 100, 'got the value stored in the prototype'); # the "class" defers to the # the prototype when asked # about attributes -is(Foo->bar, 100, '... got the value stored in the prototype (through the Foo class)'); +is(Foo->bar, 100, 'got the value stored in the prototype (through the Foo class)'); # now make an instance, which # is basically a clone of the @@ -234,30 +234,30 @@ my $foo = Foo->new; isa_ok($foo, 'Foo'); # the instance is *not* the prototype -isnt($foo, $foo_prototype, '... got a new instance of Foo'); +isnt($foo, $foo_prototype, 'got a new instance of Foo'); # but it has the same values ... -is($foo->bar, 100, '... got the value stored in the instance (inherited from the prototype)'); +is($foo->bar, 100, 'got the value stored in the instance (inherited from the prototype)'); # we can even change the values # in the instance $foo->bar(300); -is($foo->bar, 300, '... got the value stored in the instance (overwriting the one inherited from the prototype)'); +is($foo->bar, 300, 'got the value stored in the instance (overwriting the one inherited from the prototype)'); # and not change the one in the prototype -is($foo_prototype->bar, 100, '... got the value stored in the prototype'); -is(Foo->bar, 100, '... got the value stored in the prototype (through the Foo class)'); +is($foo_prototype->bar, 100, 'got the value stored in the prototype'); +is(Foo->bar, 100, 'got the value stored in the prototype (through the Foo class)'); ## subclasses # now we can check that the subclass # will seek out the correct prototypical # value from it's "parent" -is(Bar->bar, 100, '... got the value stored in the Foo prototype (through the Bar class)'); +is(Bar->bar, 100, 'got the value stored in the Foo prototype (through the Bar class)'); # we can then also set it's local attrs Bar->baz(50); -is(Bar->baz, 50, '... got the value stored in the prototype (through the Bar class)'); +is(Bar->baz, 50, 'got the value stored in the prototype (through the Bar class)'); # now we clone the Bar prototype my $bar = Bar->new; @@ -266,18 +266,18 @@ isa_ok($bar, 'Foo'); # and we see that we got the right values # in the instance/clone -is($bar->bar, 100, '... got the value stored in the instance (inherited from the Foo prototype)'); -is($bar->baz, 50, '... got the value stored in the instance (inherited from the Bar prototype)'); +is($bar->bar, 100, 'got the value stored in the instance (inherited from the Foo prototype)'); +is($bar->baz, 50, 'got the value stored in the instance (inherited from the Bar prototype)'); # nowe we can change the value $bar->bar(200); -is($bar->bar, 200, '... got the value stored in the instance (overriding the one inherited from the Foo prototype)'); +is($bar->bar, 200, 'got the value stored in the instance (overriding the one inherited from the Foo prototype)'); # and all our original and # prototypical values are still # the same -is($foo->bar, 300, '... still got the original value stored in the instance (inherited from the prototype)'); -is(Foo->bar, 100, '... still got the original value stored in the prototype (through the Foo class)'); -is(Bar->bar, 100, '... still got the original value stored in the prototype (through the Bar class)'); +is($foo->bar, 300, 'still got the original value stored in the instance (inherited from the prototype)'); +is(Foo->bar, 100, 'still got the original value stored in the prototype (through the Foo class)'); +is(Bar->bar, 100, 'still got the original value stored in the prototype (through the Bar class)'); diff --git a/t/200_examples/007_Child_Parent_attr_inherit.t b/t/200_examples/007_Child_Parent_attr_inherit.t index a2c8e92..139f489 100644 --- a/t/200_examples/007_Child_Parent_attr_inherit.t +++ b/t/200_examples/007_Child_Parent_attr_inherit.t @@ -65,23 +65,23 @@ my $parent = Parent->new( last_name => 'Smith' ); isa_ok( $parent, 'Parent' ); is( $parent->last_name, 'Smith', - '... the parent has the last name we expected' ); + 'the parent has the last name we expected' ); $parent->children( [ map { Child->new( parent => $parent ) } ( 0 .. 3 ) ] ); foreach my $child ( @{ $parent->children } ) { is( $child->last_name, $parent->last_name, - '... parent and child have the same last name (' + 'parent and child have the same last name (' . $parent->last_name . ')' ); } $parent->last_name('Jones'); -is( $parent->last_name, 'Jones', '... the parent has the new last name' ); +is( $parent->last_name, 'Jones', 'the parent has the new last name' ); foreach my $child ( @{ $parent->children } ) { is( $child->last_name, $parent->last_name, - '... parent and child have the same last name (' + 'parent and child have the same last name (' . $parent->last_name . ')' ); } @@ -101,17 +101,17 @@ $orphan->parent($parent2); foreach my $child ( @{ $parent->children } ) { is( $child->last_name, $parent->last_name, - '... parent and child have the same last name (' + 'parent and child have the same last name (' . $parent->last_name . ')' ); } isnt( $orphan->last_name, $parent->last_name, - '... the orphan child does not have the same last name anymore (' + 'the orphan child does not have the same last name anymore (' . $parent2->last_name . ')' ); is( $orphan->last_name, $parent2->last_name, - '... parent2 and orphan child have the same last name (' + 'parent2 and orphan child have the same last name (' . $parent2->last_name . ')' ); @@ -119,18 +119,18 @@ is( $orphan->last_name, $parent2->last_name, $parent->last_name('Miller'); is( $parent->last_name, 'Miller', - '... the parent has the new last name (again)' ); + 'the parent has the new last name (again)' ); foreach my $child ( @{ $parent->children } ) { is( $child->last_name, $parent->last_name, - '... parent and child have the same last name (' + 'parent and child have the same last name (' . $parent->last_name . ')' ); } isnt( $orphan->last_name, $parent->last_name, - '... the orphan child is not affected by changes in the parent anymore' ); + 'the orphan child is not affected by changes in the parent anymore' ); is( $orphan->last_name, $parent2->last_name, - '... parent2 and orphan child have the same last name (' + 'parent2 and orphan child have the same last name (' . $parent2->last_name . ')' ); diff --git a/t/200_examples/008_record_set_iterator.t b/t/200_examples/008_record_set_iterator.t index 0ae80f3..46e6192 100644 --- a/t/200_examples/008_record_set_iterator.t +++ b/t/200_examples/008_record_set_iterator.t @@ -102,18 +102,18 @@ isa_ok($rs, 'RecordSet'); my $rsi = RecordSetIterator->new(record_set => $rs); isa_ok($rsi, 'RecordSetIterator'); -is($rsi->first_name, 'Bill', '... got the right first name'); -is($rsi->last_name, 'Smith', '... got the right last name'); +is($rsi->first_name, 'Bill', 'got the right first name'); +is($rsi->last_name, 'Smith', 'got the right last name'); $rsi->get_next_record; -is($rsi->first_name, 'Bob', '... got the right first name'); -is($rsi->last_name, 'Jones', '... got the right last name'); +is($rsi->first_name, 'Bob', 'got the right first name'); +is($rsi->last_name, 'Jones', 'got the right last name'); $rsi->get_next_record; -is($rsi->first_name, 'Jim', '... got the right first name'); -is($rsi->last_name, 'Johnson', '... got the right last name'); +is($rsi->first_name, 'Jim', 'got the right first name'); +is($rsi->last_name, 'Johnson', 'got the right last name'); diff --git a/t/300_immutable/002_apply_roles_to_immutable.t b/t/300_immutable/002_apply_roles_to_immutable.t index 7976635..6899019 100644 --- a/t/300_immutable/002_apply_roles_to_immutable.t +++ b/t/300_immutable/002_apply_roles_to_immutable.t @@ -30,12 +30,12 @@ use Test::Exception; my $foo = Foo->new; isa_ok($foo, 'Foo'); -is($foo->baz, 'Foo::baz', '... got the right value'); +is($foo->baz, 'Foo::baz', 'got the right value'); lives_ok { My::Role->meta->apply($foo) -} '... successfully applied the role to immutable instance'; +} 'successfully applied the role to immutable instance'; -is($foo->baz, 'My::Role::baz(Foo::baz)', '... got the right value'); +is($foo->baz, 'My::Role::baz(Foo::baz)', 'got the right value'); diff --git a/t/300_immutable/003_immutable_meta_class.t b/t/300_immutable/003_immutable_meta_class.t index c53aae3..ed74ba4 100644 --- a/t/300_immutable/003_immutable_meta_class.t +++ b/t/300_immutable/003_immutable_meta_class.t @@ -23,5 +23,5 @@ use Test::Exception; lives_ok { My::Meta->meta()->make_immutable(debug => 0) -} '... can make a meta class immutable'; +} 'can make a meta class immutable'; diff --git a/t/300_immutable/007_immutable_trigger_from_constructor.t b/t/300_immutable/007_immutable_trigger_from_constructor.t index d02d5c9..65e0d5e 100644 --- a/t/300_immutable/007_immutable_trigger_from_constructor.t +++ b/t/300_immutable/007_immutable_trigger_from_constructor.t @@ -34,7 +34,7 @@ like ($@, qr/^Pulling the Foo trigger/, "trigger from immutable constructor"); eval { AClass->new(baz => 'bar') }; like ($@, qr/^Pulling the Baz trigger/, "trigger from immutable constructor"); -lives_ok { AClass->new(bar => 'bar') } '... no triggers called'; +lives_ok { AClass->new(bar => 'bar') } 'no triggers called'; diff --git a/t/300_immutable/009_buildargs.t b/t/300_immutable/009_buildargs.t index b8a7527..1df3fca 100644 --- a/t/300_immutable/009_buildargs.t +++ b/t/300_immutable/009_buildargs.t @@ -34,13 +34,13 @@ foreach my $class qw(Foo Bar) { is( $class->new( 37 )->bar, 37, "single arg" ); { my $o = $class->new(bar => 42, baz => 47); - is($o->bar, 42, '... got the right bar'); - is($o->baz, 47, '... got the right bar'); + is($o->bar, 42, 'got the right bar'); + is($o->baz, 47, 'got the right bar'); } { my $o = $class->new(42, baz => 47); - is($o->bar, 42, '... got the right bar'); - is($o->baz, 47, '... got the right bar'); + is($o->bar, 42, 'got the right bar'); + is($o->baz, 47, 'got the right bar'); } } diff --git a/t/400_moose_util/002_moose_util_does_role.t b/t/400_moose_util/002_moose_util_does_role.t index c05ce94..7f64430 100644 --- a/t/400_moose_util/002_moose_util_does_role.t +++ b/t/400_moose_util/002_moose_util_does_role.t @@ -45,37 +45,37 @@ BEGIN { # Classes -ok(does_role('Bar', 'Foo'), '... Bar does Foo'); +ok(does_role('Bar', 'Foo'), 'Bar does Foo'); -ok(!does_role('Baz', 'Foo'), '... Baz doesnt do Foo'); +ok(!does_role('Baz', 'Foo'), 'Baz doesnt do Foo'); # Objects my $bar = Bar->new; -ok(does_role($bar, 'Foo'), '... $bar does Foo'); +ok(does_role($bar, 'Foo'), '$bar does Foo'); my $baz = Baz->new; -ok(!does_role($baz, 'Foo'), '... $baz doesnt do Foo'); +ok(!does_role($baz, 'Foo'), '$baz doesnt do Foo'); # Invalid values -ok(!does_role(undef,'Foo'), '... undef doesnt do Foo'); +ok(!does_role(undef,'Foo'), 'undef doesnt do Foo'); -ok(!does_role(1,'Foo'), '... 1 doesnt do Foo'); +ok(!does_role(1,'Foo'), '1 doesnt do Foo'); # non Moose metaclass -ok(!does_role('Quux', 'Foo'), '... Quux doesnt do Foo (does not die tho)'); +ok(!does_role('Quux', 'Foo'), 'Quux doesnt do Foo (does not die tho)'); # TODO: make the below work, maybe? # Self -#ok(does_role('Foo', 'Foo'), '... Foo does do Foo'); +#ok(does_role('Foo', 'Foo'), 'Foo does do Foo'); # sub-Roles -#ok(does_role('Foo::Foo', 'Foo'), '... Foo::Foo does do Foo'); +#ok(does_role('Foo::Foo', 'Foo'), 'Foo::Foo does do Foo'); diff --git a/t/400_moose_util/003_moose_util_search_class_by_role.t b/t/400_moose_util/003_moose_util_search_class_by_role.t index 7e46cf2..517bec7 100644 --- a/t/400_moose_util/003_moose_util_search_class_by_role.t +++ b/t/400_moose_util/003_moose_util_search_class_by_role.t @@ -16,25 +16,25 @@ BEGIN { { package SCBR::A; use Moose; } -is search_class_by_role('SCBR::A', 'SCBR::Role'), undef, '... not found role returns undef'; +is search_class_by_role('SCBR::A', 'SCBR::Role'), undef, 'not found role returns undef'; { package SCBR::B; use Moose; extends 'SCBR::A'; with 'SCBR::Role'; } -is search_class_by_role('SCBR::B', 'SCBR::Role'), 'SCBR::B', '... class itself returned if it does role'; +is search_class_by_role('SCBR::B', 'SCBR::Role'), 'SCBR::B', 'class itself returned if it does role'; { package SCBR::C; use Moose; extends 'SCBR::B'; } -is search_class_by_role('SCBR::C', 'SCBR::Role'), 'SCBR::B', '... nearest class doing role returned'; +is search_class_by_role('SCBR::C', 'SCBR::Role'), 'SCBR::B', 'nearest class doing role returned'; { package SCBR::D; use Moose; extends 'SCBR::C'; with 'SCBR::Role'; } -is search_class_by_role('SCBR::D', 'SCBR::Role'), 'SCBR::D', '... nearest class being direct class returned'; +is search_class_by_role('SCBR::D', 'SCBR::Role'), 'SCBR::D', 'nearest class being direct class returned'; diff --git a/t/500_test_moose/003_test_moose_has_attribute_ok.t b/t/500_test_moose/003_test_moose_has_attribute_ok.t index 99e69f2..54da3a7 100644 --- a/t/500_test_moose/003_test_moose_has_attribute_ok.t +++ b/t/500_test_moose/003_test_moose_has_attribute_ok.t @@ -29,20 +29,20 @@ BEGIN { test_out('ok 1 - ... has_attribute_ok(Foo, foo) passes'); -has_attribute_ok('Foo', 'foo', '... has_attribute_ok(Foo, foo) passes'); +has_attribute_ok('Foo', 'foo', 'has_attribute_ok(Foo, foo) passes'); test_out ('not ok 2 - ... has_attribute_ok(Foo, bar) fails'); test_fail (+2); -has_attribute_ok('Foo', 'bar', '... has_attribute_ok(Foo, bar) fails'); +has_attribute_ok('Foo', 'bar', 'has_attribute_ok(Foo, bar) fails'); test_out('ok 3 - ... has_attribute_ok(Bar, foo) passes'); -has_attribute_ok('Bar', 'foo', '... has_attribute_ok(Bar, foo) passes'); +has_attribute_ok('Bar', 'foo', 'has_attribute_ok(Bar, foo) passes'); test_out('ok 4 - ... has_attribute_ok(Bar, bar) passes'); -has_attribute_ok('Bar', 'bar', '... has_attribute_ok(Bar, bar) passes'); +has_attribute_ok('Bar', 'bar', 'has_attribute_ok(Bar, bar) passes'); test_test ('has_attribute_ok'); diff --git a/t/500_test_moose/004_test_moose_meta_ok.t b/t/500_test_moose/004_test_moose_meta_ok.t index a4cb60b..0571d65 100644 --- a/t/500_test_moose/004_test_moose_meta_ok.t +++ b/t/500_test_moose/004_test_moose_meta_ok.t @@ -21,12 +21,12 @@ BEGIN { test_out('ok 1 - ... meta_ok(Foo) passes'); -meta_ok('Foo', '... meta_ok(Foo) passes'); +meta_ok('Foo', 'meta_ok(Foo) passes'); test_out ('not ok 2 - ... meta_ok(Bar) fails'); test_fail (+2); -meta_ok('Bar', '... meta_ok(Bar) fails'); +meta_ok('Bar', 'meta_ok(Bar) fails'); test_test ('meta_ok');