[Moose-commits] r7327 - MooseX-Role-Parameterized/trunk/t
sartak at code2.0beta.co.uk
sartak at code2.0beta.co.uk
Sun Jan 18 02:05:46 GMT 2009
Author: sartak
Date: 2009-01-17 18:05:45 -0800 (Sat, 17 Jan 2009)
New Revision: 7327
Modified:
MooseX-Role-Parameterized/trunk/t/001-parameters.t
Log:
Make sure this length parameter is r/o
Modified: MooseX-Role-Parameterized/trunk/t/001-parameters.t
===================================================================
--- MooseX-Role-Parameterized/trunk/t/001-parameters.t 2009-01-18 02:04:13 UTC (rev 7326)
+++ MooseX-Role-Parameterized/trunk/t/001-parameters.t 2009-01-18 02:05:45 UTC (rev 7327)
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 12;
+use Test::More tests => 13;
use Test::Exception;
use MooseX::Role::Parameterized::Parameters;
@@ -45,6 +45,10 @@
is($p->length, 5, "correct length");
+throws_ok {
+ $p->length(10);
+} qr/^Cannot assign a value to a read-only accessor/;
+
do {
package MyRole::LengthParameter;
use MooseX::Role::Parameterized;
More information about the Moose-commits
mailing list