Also see Moose::Manual::Delta for more details of, and workarounds
for, noteworthy changes.
+0.76
+ * Tests
+ - Warnings tests have standardized on Test::Output which is now an
+ unconditionally dependency (Sartak)
+
0.75 Mon, April 20, 2009
* Moose
* Moose::Meta::Class
test_requires 'Test::More' => '0.77';
test_requires 'Test::Exception' => '0.21';
+test_requires 'Test::Output' => '0.09';
if ( -d '.svn' || -d '.git' || $ENV{IS_MAINTAINER} ) {
system( $^X, 'author/extract-inline-tests' );
=begin testing-SETUP
BEGIN {
- eval 'use Test::Warn 0.11;';
- if ($@) {
- diag 'Test::Warn 0.11+ is required for this test';
- ok(1);
- exit 0;
- }
+ use Test::Output;
}
=end testing-SETUP
ok( Foo->can('size'), 'Foo has a size method' );
my $foo;
-warning_is(
+stderr_like(
sub { $foo = Foo->new( size => 2 ) },
- 'Making a new Foo',
+ qr/^Making a new Foo/,
'got expected warning when calling Foo->new'
);
use strict;
use warnings;
-use Test::More;
-
-BEGIN {
- eval "use Test::Output;";
- plan skip_all => "Test::Output is required for this test" if $@;
- plan tests => 2;
-}
+use Test::More tests => 2;
+use Test::Output;
stderr_is( sub { package main; eval 'use Moose' },
"Moose does not export its sugar to the 'main' package.\n",
use strict;
use warnings;
-use Test::More;
+use Test::More tests => 45;
use Test::Exception;
-
-BEGIN {
- unless ( eval 'use Test::Warn 0.11; 1' ) {
- plan skip_all => 'These tests require Test::Warn 0.11';
- }
- else {
- plan tests => 45;
- }
-}
+use Test::Output;
{
no Moose;
- ::warning_is( sub { eval q[sub make_immutable { return 'foo' }] },
+ ::stderr_is( sub { eval q[sub make_immutable { return 'foo' }] },
'',
'no warning when defining our own make_immutable sub' );
}
use strict;
use warnings;
-use Test::More;
-
-eval "use Test::Output";
-plan skip_all => "Test::Output is required for this test" if $@;
-
-plan tests => 6;
+use Test::More tests => 6;
+use Test::Output;
{
package NotMoose;
use strict;
use warnings;
-use Test::More;
-
-eval "use Test::Output";
-plan skip_all => "Test::Output is required for this test" if $@;
-
-plan tests => 1;
+use Test::More tests => 1;
+use Test::Output;
{
package ModdedNew;
use strict;
use warnings;
-use Test::More;
-
-eval "use Test::Output";
-plan skip_all => "Test::Output is required for this test" if $@;
-
-plan tests => 1;
+use Test::More tests => 1;
+use Test::Output;
{
package Foo;