#!/usr/bin/perl
+
$|++;
use strict;
use warnings;
-use Test::More tests => 33;
+use Test::More;
use Storable;
-use Test::JSON;
-use Test::YAML::Valid;
BEGIN {
- $ENV{JSON_ANY_ORDER} = qw(JSON);
+ eval "use Test::JSON; use Test::YAML::Valid;";
+ 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 => 32;
use_ok('MooseX::Storage');
}
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'
- );
-
}
{