[libmoosex-lazyrequire-perl] 06/11: remove invalid tests that work only when hash ordering lucks out
Intrigeri
intrigeri at moszumanska.debian.org
Wed Aug 27 21:25:24 UTC 2014
This is an automated email from the git hooks/post-receive script.
intrigeri pushed a commit to annotated tag v0.09
in repository libmoosex-lazyrequire-perl.
commit 1fe537798982c9c6fcd11941cbd7476e55f91045
Author: Karen Etheridge <ether at cpan.org>
Date: Sat Dec 1 13:13:54 2012 -0800
remove invalid tests that work only when hash ordering lucks out
---
Changes | 3 +++
t/basic.t | 29 ++++++-----------------------
2 files changed, 9 insertions(+), 23 deletions(-)
diff --git a/Changes b/Changes
index 732527d..53756f6 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,9 @@
Change history for distribution {{$dist->name}}
{{$NEXT}}
+ * Invalid tests that failed on perl 5.17.6 have been fixed (they were always
+ invalid, but the changes to hash key ordering only now made the tests
+ start failing in an obvious way) (RT#81419)
0.08 2012-07-02 09:58:41 PDT-0700 (Karen Etheridge)
* Convert uses of Test::Exception to Test::Fatal
diff --git a/t/basic.t b/t/basic.t
index 675995a..eaa1d6f 100644
--- a/t/basic.t
+++ b/t/basic.t
@@ -12,39 +12,22 @@ use Test::Fatal;
is => 'ro',
lazy_required => 1,
);
-
- has baz => (
- is => 'ro',
- builder => '_build_baz',
- );
-
- sub _build_baz { shift->bar + 1 }
}
{
- my $foo;
is(
- exception { $foo = Foo->new(bar => 42) },
+ exception { Foo->new },
undef,
+ 'lazy_required attrs are not required until first accessed',
);
- is($foo->baz, 43);
-}
-{
- my $foo;
- is(
- exception { $foo = Foo->new(baz => 23) },
- undef,
- 'can set other attr explicitly without interfering',
+ like(
+ exception { Foo->new->bar },
+ qr/Attribute bar must be provided/,
+ 'lazy_required value was not provided',
);
- is($foo->baz, 23);
}
-like(
- exception { Foo->new },
- qr/Attribute bar must be provided/,
-);
-
{
package Bar;
use Moose;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmoosex-lazyrequire-perl.git
More information about the Pkg-perl-cvs-commits
mailing list