Removed dependency on Best.
Jonathan Yu [Sun, 10 Jan 2010 03:25:04 +0000 (22:25 -0500)]
YAML tests now require YAML (which will automatically load YAML::Syck if
available, or the best YAML implementation).

Makefile.PL
lib/MooseX/Storage/Format/YAML.pm
t/020_basic_yaml.t
t/060_basic_deferred.t

index 2415872..bfb5f1c 100644 (file)
@@ -20,7 +20,7 @@ feature 'JSON',
 
 feature 'YAML',
   -default            => 1,
-  'Best'              => '0.1',
+  'YAML'              => '0',
   'Test::YAML::Valid' => '0';
 
 feature 'Storable',
index 390139c..1109a01 100644 (file)
@@ -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';
index 87e3fae..a6554d6 100644 (file)
@@ -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'
-    );
-
 }
 
 {
index 9be9b3a..451bfd9 100644 (file)
@@ -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'
-    );
-
 }
 
 {