Skip to content

Commit

Permalink
better diagnostics message for finished_ok test
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Apr 25, 2013
1 parent bc4ac25 commit 6d522b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changes
Expand Up @@ -2,6 +2,7 @@
3.97 2013-04-25
- Added data attribute to Mojo::URL.
- Improved compatibility with IO::Socket::SSL 1.87.
- Improved Test::Mojo diagnostics messages.
- Improved documentation.
- Improved tests.
- Fixed a few small timing bugs in WebSocket tests.
Expand Down
2 changes: 1 addition & 1 deletion lib/Test/Mojo.pm
Expand Up @@ -111,7 +111,7 @@ sub finish_ok {
sub finished_ok {
my ($self, $code) = @_;
Mojo::IOLoop->one_tick while !$self->{finished};
Test::More::diag "Status $self->{finished}[0]"
Test::More::diag "WebSocket closed with status $self->{finished}[0]"
unless my $ok = grep { $self->{finished}[0] == $_ } $code, 1006;
return $self->_test('ok', $ok, "finished WebSocket with status $code");
}
Expand Down

0 comments on commit 6d522b1

Please sign in to comment.