Skip to content

Commit

Permalink
more delay tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 4, 2012
1 parent 0d571a9 commit f1456ac
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Changes
@@ -1,4 +1,8 @@

3.21 2012-08-05
- Improved documentation.
- Improved tests.

3.20 2012-08-04
- Added extract_start_line method to Mojo::Message, Mojo::Message::Request
and Mojo::Message::Response.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/IOLoop/Delay.pm
Expand Up @@ -63,7 +63,7 @@ L<Mojo::IOLoop::Delay> can emit the following events.
=head2 C<finish>
$delay->on(finish => sub {
my $delay = shift;
my ($delay, @args) = @_;
...
});
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious.pm
Expand Up @@ -34,7 +34,7 @@ has static => sub { Mojolicious::Static->new };
has types => sub { Mojolicious::Types->new };

our $CODENAME = 'Rainbow';
our $VERSION = '3.20';
our $VERSION = '3.21';

# "These old doomsday devices are dangerously unstable.
# I'll rest easier not knowing where they are."
Expand Down
4 changes: 3 additions & 1 deletion t/mojo/delay.t
Expand Up @@ -6,7 +6,7 @@ BEGIN {
$ENV{MOJO_REACTOR} = 'Mojo::Reactor::Poll';
}

use Test::More tests => 7;
use Test::More tests => 8;

# "And now to create an unstoppable army of between one million and two
# million zombies!"
Expand All @@ -20,7 +20,9 @@ for my $i (0, 0) {
$delay->begin;
Mojo::IOLoop->timer(0 => sub { push @results, $i; $delay->end });
}
my $end = $delay->begin;
$delay->begin;
is $end->(), 3, 'three remaining';
is $delay->end, 2, 'two remaining';
$delay->wait;
is_deeply \@results, [0, 0], 'right results';
Expand Down

0 comments on commit f1456ac

Please sign in to comment.