Skip to content

Commit

Permalink
better tap tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Nov 2, 2014
1 parent b46d507 commit 142efd8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions t/mojo/base.t
Expand Up @@ -68,9 +68,10 @@ $monkey = Mojo::BaseTest->new;
is $monkey->tap(sub { $_->name('foo') })->name, 'foo', 'right attribute value';
is $monkey->tap(sub { shift->name('bar')->name })->name, 'bar',
'right attribute value';
is $monkey->tap('heads')->heads, 1, 'right attribute value';
is $monkey->tap('more_heads')->heads, 2, 'right attribute value';
is $monkey->tap(more_heads => 3)->heads, 5, 'right attribute value';
is $monkey->tap('heads')->heads, 1, 'right attribute value';
is $monkey->more_heads, 2, 'right attribute value';
is $monkey->tap('more_heads')->heads, 3, 'right attribute value';
is $monkey->tap(more_heads => 3)->heads, 6, 'right attribute value';

# Inherit -base flag
$monkey = Mojo::BaseTest::Base3->new(evil => 1);
Expand Down

0 comments on commit 142efd8

Please sign in to comment.