X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FCookbook%2FBasics%2FRecipe4.pod;h=9b1253c89a850cd8af09b3fd0a6c6394a4124e78;hb=refs%2Fheads%2Fabandoned%2Fdeath_to_all_ellipses;hp=4e3747e5e0ad55518237088457876e753a3c0b98;hpb=cad0dd796548b50a7c1842ed4279b9ea95b5d493;p=gitmo%2FMoose.git 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