X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F070_native_traits%2F010_trait_array.t;h=8774ffa9245e5dc835d5ab5fb7f903cefd117759;hb=8fc30049991bd3bde3251577ff3edf6633d3fc2e;hp=378590428890fdf293dc3ed2b3cb291a9bf49b0c;hpb=65594cb42f7a2c12646212d1c419ac37bad32b6e;p=gitmo%2FMoose.git diff --git a/t/070_native_traits/010_trait_array.t b/t/070_native_traits/010_trait_array.t index 3785904..8774ffa 100644 --- a/t/070_native_traits/010_trait_array.t +++ b/t/070_native_traits/010_trait_array.t @@ -227,6 +227,14 @@ sub run_tests { is( $obj->accessor( 1 => 97 ), 97, 'accessor returns new value' ); }, undef, 'accessor as writer lives' ); + like( + exception { + $obj->accessor; + }, + qr/Cannot call accessor without at least 1 argument/, + 'throws an error when accessor is called without arguments' + ); + is( $obj->get(1), 97, 'accessor set value at index 1'