[libmoosex-lazyrequire-perl] 02/08: TODO test for RT#76054
Intrigeri
intrigeri at moszumanska.debian.org
Wed Aug 27 21:25:21 UTC 2014
This is an automated email from the git hooks/post-receive script.
intrigeri pushed a commit to annotated tag v0.08
in repository libmoosex-lazyrequire-perl.
commit 29747d0442c9255390f5f1b5a81f5bfbd5272f0d
Author: Karen Etheridge <ether at cpan.org>
Date: Sat Jun 30 22:04:12 2012 -0700
TODO test for RT#76054
---
Changes | 1 +
dist.ini | 1 +
t/rt76054_inheritance.t | 41 +++++++++++++++++++++++++++++++++++++++++
3 files changed, 43 insertions(+)
diff --git a/Changes b/Changes
index 3f3222c..cc6dc6e 100644
--- a/Changes
+++ b/Changes
@@ -1,4 +1,5 @@
* Convert uses of Test::Exception to Test::Fatal
+ * Add TODO test for RT#76054 (thanks for the report, ilyuha!)
0.07 Mon, 04 Apr 2011 18:08:34 +0200
* Allow this module to be used with attributes in roles when using Moose
diff --git a/dist.ini b/dist.ini
index 453df9e..c4a90e1 100644
--- a/dist.ini
+++ b/dist.ini
@@ -12,3 +12,4 @@ auto_prereqs = 0
[AutoPrereqs]
skip = ^Role$
+skip = ^Account$
diff --git a/t/rt76054_inheritance.t b/t/rt76054_inheritance.t
new file mode 100644
index 0000000..fe5c3f6
--- /dev/null
+++ b/t/rt76054_inheritance.t
@@ -0,0 +1,41 @@
+use strict;
+use warnings;
+
+use Test::More tests => 1;
+use Test::Fatal;
+
+local $TODO = 'RT#75054';
+
+{
+ package Account;
+ use Moose;
+ use MooseX::LazyRequire;
+
+ has password => (
+ is => 'rw',
+ isa => 'Str',
+ );
+
+ package AccountExt;
+
+ use Moose;
+ extends 'Account';
+ use MooseX::LazyRequire;
+ use Carp;
+
+ has '+password' => (
+ is => 'ro',
+ # Probably there also should be:
+ # traits => ['LazyRequire'],
+ # but I'm not sure
+ lazy_required => 1,
+ );
+
+}
+my $r = AccountExt->new;
+like(
+ exception { $r->password },
+ qr/Attribute password must be provided before calling reader/,
+ 'works on inherited attributes'
+);
+
--
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