From: Jonathan Yu Date: Sun, 10 Jan 2010 03:25:04 +0000 (-0500) Subject: Removed dependency on Best; YAML tests now require YAML (which will automatically... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b519434db5388f49d24d7ab28ceb7c1d07d333ce;p=gitmo%2FMooseX-Storage.git Removed dependency on Best; YAML tests now require YAML (which will automatically load YAML::Syck if available, or the best YAML implementation) --- diff --git a/Makefile.PL b/Makefile.PL index 2415872..bfb5f1c 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -20,7 +20,7 @@ feature 'JSON', feature 'YAML', -default => 1, - 'Best' => '0.1', + 'YAML' => '0', 'Test::YAML::Valid' => '0'; feature 'Storable', diff --git a/lib/MooseX/Storage/Format/YAML.pm b/lib/MooseX/Storage/Format/YAML.pm index 390139c..1109a01 100644 --- a/lib/MooseX/Storage/Format/YAML.pm +++ b/lib/MooseX/Storage/Format/YAML.pm @@ -5,10 +5,7 @@ use Moose::Role; # Tests break because tye YAML is invalid...? # -dcp -use Best [ - [ qw[YAML::Syck YAML] ], - [ qw[Load Dump] ] -]; +use YAML qw(Load Dump); our $VERSION = '0.23'; our $AUTHORITY = 'cpan:STEVAN'; diff --git a/t/020_basic_yaml.t b/t/020_basic_yaml.t index 87e3fae..a6554d6 100644 --- a/t/020_basic_yaml.t +++ b/t/020_basic_yaml.t @@ -6,11 +6,11 @@ use warnings; use Test::More; BEGIN { + eval "use YAML"; + plan skip_all => "YAML is required for this test" if $@; eval "use Test::YAML::Valid"; plan skip_all => "Test::YAML::Valid is required for this test" if $@; - eval "use Best [[qw(YAML::Syck YAML)]]"; - plan skip_all => "YAML or YAML::syck and Best are required for this test" if $@; - plan tests => 12; + plan tests => 11; use_ok('MooseX::Storage'); } @@ -45,42 +45,6 @@ BEGIN { yaml_string_ok( $yaml, '... we got valid YAML out of it' ); - is( - $yaml, - q{--- -__CLASS__: Foo -array: - - 1 - - 2 - - 3 - - 4 - - 5 - - 6 - - 7 - - 8 - - 9 - - 10 -float: 10.5 -hash: - 1: ~ - 10: ~ - 2: ~ - 3: ~ - 4: ~ - 5: ~ - 6: ~ - 7: ~ - 8: ~ - 9: ~ -number: 10 -object: - __CLASS__: Foo - number: 2 -string: foo -}, - '... got the same YAML' - ); - } { diff --git a/t/060_basic_deferred.t b/t/060_basic_deferred.t index 9be9b3a..451bfd9 100644 --- a/t/060_basic_deferred.t +++ b/t/060_basic_deferred.t @@ -12,7 +12,7 @@ BEGIN { plan skip_all => "Test::JSON and Test::YAML::Valid are required for this test" if $@; eval "use JSON::Any"; plan skip_all => "JSON::Any is required for this test" if $@; - plan tests => 33; + plan tests => 32; use_ok('MooseX::Storage'); } @@ -155,42 +155,6 @@ BEGIN { yaml_string_ok( $yaml, '... we got valid YAML out of it' ); - is( - $yaml, - q{--- -__CLASS__: Foo -array: - - 1 - - 2 - - 3 - - 4 - - 5 - - 6 - - 7 - - 8 - - 9 - - 10 -float: 10.5 -hash: - 1: ~ - 10: ~ - 2: ~ - 3: ~ - 4: ~ - 5: ~ - 6: ~ - 7: ~ - 8: ~ - 9: ~ -number: 10 -object: - __CLASS__: Foo - number: 2 -string: foo -}, - '... got the same YAML' - ); - } {