#!perl use strict; use warnings; use Test::More; use Test::Exception; use Catmandu::Importer::MARC; use Catmandu::Fix; use utf8; my $pkg; BEGIN { $pkg = 'Catmandu::Fix::Condition::marc_spec_has'; use_ok $pkg; } require_ok $pkg; my $fixes = <new(fixes => [$fixes]); my $importer = Catmandu::Importer::MARC->new( file => 't/camel9.mrc' ); my $records = $fixer->fix($importer)->to_array; is $records->[0]->{type}, 'Book'; done_testing;