BEGIN {
require Exporter;
@ISA = qw{ Exporter };
- @EXPORT = qw{ tests yaml_ok slurp load_ok test_data_directory };
+ @EXPORT = qw{
+ tests yaml_ok yaml_error slurp load_ok
+ test_data_directory
+ };
}
sub test_data_directory {
return 1;
}
+sub yaml_error {
+ my $string = shift;
+ my $yaml = eval { Parse::CPAN::Meta::Load( $string ); };
+ Test::More::like( $@, qr/$_[0]/, "YAML::Tiny throws expected error" );
+}
+
sub slurp {
my $file = shift;
local $/ = undef;