summaryrefslogtreecommitdiffstats
path: root/t/32-defaults.t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2011-02-21 12:52:56 -0600
committerJesse Luehrs <doy@tozt.net>2011-02-21 12:52:56 -0600
commiteb3f39183f1e1039a4d9a73cb1c2b19ea514c436 (patch)
tree24d5a2c1c27b5d35661fa078040b4ad9f87aff5d /t/32-defaults.t
parent7254fb6a608b1f54d52572a859356236d0a0ba2e (diff)
downloadbread-board-declare-eb3f39183f1e1039a4d9a73cb1c2b19ea514c436.tar.gz
bread-board-declare-eb3f39183f1e1039a4d9a73cb1c2b19ea514c436.zip
also disallow builder
Diffstat (limited to 't/32-defaults.t')
-rw-r--r--t/32-defaults.t31
1 files changed, 31 insertions, 0 deletions
diff --git a/t/32-defaults.t b/t/32-defaults.t
index d3f1485..a40a235 100644
--- a/t/32-defaults.t
+++ b/t/32-defaults.t
@@ -30,6 +30,16 @@ use Test::Fatal;
"can't set a default when creating a service");
::like(::exception {
+ has bar2 => (
+ is => 'ro',
+ isa => 'Str',
+ builder => '_build_bar2',
+ value => 'FOO',
+ );
+ }, qr/builder is not valid when Bread::Board service options are set/,
+ "can't set a builder when creating a service");
+
+ ::like(::exception {
has baz => (
is => 'ro',
isa => 'Str',
@@ -50,6 +60,27 @@ use Test::Fatal;
);
}, qr/default is not valid when Bread::Board service options are set/,
"can't set a default when creating a service");
+
+ ::like(::exception {
+ has quux2 => (
+ is => 'ro',
+ isa => 'Str',
+ lazy => 1,
+ builder => '_build_quux2',
+ value => 'FOO',
+ );
+ }, qr/builder is not valid when Bread::Board service options are set/,
+ "can't set a builder when creating a service");
+
+ ::like(::exception {
+ has quux3 => (
+ is => 'ro',
+ isa => 'Str',
+ lazy_build => 1,
+ value => 'FOO',
+ );
+ }, qr/builder is not valid when Bread::Board service options are set/,
+ "can't set lazy_build when creating a service");
}
done_testing;