From: Dave Rolsky Date: Sat, 25 Sep 2010 18:54:25 +0000 (-0500) Subject: Test lazy default for String trait X-Git-Tag: 1.15~99 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=69048e4ea47db686137e4aed5c29d1b034af895b;p=gitmo%2FMoose.git Test lazy default for String trait --- diff --git a/t/070_native_traits/005_trait_string.t b/t/070_native_traits/005_trait_string.t index f76783e..ebd2063 100644 --- a/t/070_native_traits/005_trait_string.t +++ b/t/070_native_traits/005_trait_string.t @@ -263,6 +263,17 @@ sub run_tests { $obj->_string, 'song long string', 'substr_curried_3 as setter' ); + + if ( $class->meta->get_attribute('_string')->is_lazy ) { + my $obj = $class->new; + + $obj->append('foo'); + + is( + $obj->_string, 'foo', + 'append with lazy default' + ); + } } $class; }