12 eval "use YAML::Syck ()";
16 plan skip_all => "YAML or YAML::Syck required for this test";
22 use_ok('MXDefaultConfigTest');
25 # Can it load a simple YAML file with the options
26 # based on a default in the configfile attr
28 open(my $test_yaml, '>', 'test.yaml')
29 or die "Cannot create test.yaml: $!";
30 print $test_yaml "direct_attr: 123\ninherited_ro_attr: asdf\nreq_attr: foo\n";
34 MXDefaultConfigTest->new_with_config();
36 ok(!$@, 'Did not die with good YAML configfile')
39 is($foo->req_attr, 'foo', 'req_attr works');
40 is($foo->direct_attr, 123, 'direct_attr works');
41 is($foo->inherited_ro_attr, 'asdf', 'inherited_ro_attr works');
44 END { unlink('test.yaml') }