plan skip_all => 'JSON format not supported';
}
else {
- plan tests => 2;
+ plan tests => 4;
}
{
ok( $config );
is( $config->{ name }, 'TestApp' );
}
+
+# test invalid config
+{
+ my $file = 't/invalid/conf.json';
+ my $config = eval { Config::Any::JSON->load( $file ) };
+
+ ok( !$config, 'config load failed' );
+ ok( $@, "error thrown ($@)" );
+}