From: Dave Rolsky Date: Sat, 25 Sep 2010 18:17:41 +0000 (-0500) Subject: s/page/foo/g X-Git-Tag: 1.15~104 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7468c2fe598207f51d0f5cf18c3f4f43b6d2845a;hp=8b0c0c9d3628d7fd7b09256213e12843862bab71;p=gitmo%2FMoose.git s/page/foo/g --- diff --git a/t/070_native_traits/001_trait_counter.t b/t/070_native_traits/001_trait_counter.t index eda1b6f..cce98d2 100644 --- a/t/070_native_traits/001_trait_counter.t +++ b/t/070_native_traits/001_trait_counter.t @@ -34,55 +34,55 @@ my %handles = ( can_ok( 'Foo', $_ ) for sort keys %handles; with_immutable { - my $page = Foo->new(); + my $foo = Foo->new(); - is( $page->counter, 0, '... got the default value' ); + is( $foo->counter, 0, '... got the default value' ); - $page->inc_counter; - is( $page->counter, 1, '... got the incremented value' ); + $foo->inc_counter; + is( $foo->counter, 1, '... got the incremented value' ); - $page->inc_counter; - is( $page->counter, 2, '... got the incremented value (again)' ); + $foo->inc_counter; + is( $foo->counter, 2, '... got the incremented value (again)' ); - throws_ok { $page->inc_counter( 1, 2 ) } + throws_ok { $foo->inc_counter( 1, 2 ) } qr/Cannot call inc with more than 1 argument/, 'inc throws an error when two arguments are passed'; - $page->dec_counter; - is( $page->counter, 1, '... got the decremented value' ); + $foo->dec_counter; + is( $foo->counter, 1, '... got the decremented value' ); - throws_ok { $page->dec_counter( 1, 2 ) } + throws_ok { $foo->dec_counter( 1, 2 ) } qr/Cannot call dec with more than 1 argument/, 'dec throws an error when two arguments are passed'; - $page->reset_counter; - is( $page->counter, 0, '... got the original value' ); + $foo->reset_counter; + is( $foo->counter, 0, '... got the original value' ); - throws_ok { $page->reset_counter(2) } + throws_ok { $foo->reset_counter(2) } qr/Cannot call reset with any arguments/, 'reset throws an error when an argument is passed'; - $page->set_counter(5); - is( $page->counter, 5, '... set the value' ); + $foo->set_counter(5); + is( $foo->counter, 5, '... set the value' ); - throws_ok { $page->set_counter( 1, 2 ) } + throws_ok { $foo->set_counter( 1, 2 ) } qr/Cannot call set with more than 1 argument/, 'set throws an error when two arguments are passed'; - $page->inc_counter(2); - is( $page->counter, 7, '... increment by arg' ); + $foo->inc_counter(2); + is( $foo->counter, 7, '... increment by arg' ); - $page->dec_counter(5); - is( $page->counter, 2, '... decrement by arg' ); + $foo->dec_counter(5); + is( $foo->counter, 2, '... decrement by arg' ); - $page->inc_counter_2; - is( $page->counter, 4, '... curried increment' ); + $foo->inc_counter_2; + is( $foo->counter, 4, '... curried increment' ); - $page->dec_counter_2; - is( $page->counter, 2, '... curried deccrement' ); + $foo->dec_counter_2; + is( $foo->counter, 2, '... curried deccrement' ); - $page->set_counter_42; - is( $page->counter, 42, '... curried set' ); + $foo->set_counter_42; + is( $foo->counter, 42, '... curried set' ); } 'Foo';