=================================================================== RCS file: /cvs/todotxt/Text-Todo-REST-API/t/formats/md5.t,v retrieving revision 1.1 retrieving revision 1.4 diff -u -r1.1 -r1.4 --- todotxt/Text-Todo-REST-API/t/formats/md5.t 2010/01/17 22:56:15 1.1 +++ todotxt/Text-Todo-REST-API/t/formats/md5.t 2010/01/19 03:18:34 1.4 @@ -7,16 +7,15 @@ # AUTHOR: Andrew Fresh (AAF), andrew@cpan.org # COMPANY: Red River Communications # CREATED: 01/07/10 19:11 -# REVISION: $AFresh1: text.t,v 1.3 2010/01/17 21:53:35 andrew Exp $ +# REVISION: $AFresh1: md5.t,v 1.3 2010/01/18 13:47:53 andrew Exp $ #=============================================================================== use strict; use warnings; -use Test::More tests => 40; +use Test::More tests => 38; my $class; -my $subclass; my $ext; BEGIN { @@ -24,16 +23,12 @@ $class = 'Text::Todo::REST::API'; use_ok( $class, "use $class" ); - - $subclass = $class . '::' . $ext; - use_ok( $subclass, "use $subclass" ); } -diag("Testing entry $subclass $Text::Todo::REST::API::md5::VERSION"); +diag("Testing entry $class $Text::Todo::REST::API::VERSION"); my $api = new_ok( $class, - [ { basedir => 't', path_info => '/lists/todo.' . $ext } ] ); -isa_ok( $api, $subclass ); + [ { todo_dir => 't/lists', path_info => '/todo.' . $ext } ] ); my $list_should_be = [ { 'text' => '(A) entry 1 @one +uno', @@ -67,8 +62,8 @@ @{$list_should_be}; my $result; -ok( !eval { $result = $api->Load() }, 'Load method' ); -like( $@, '/^Unable to Load \[list\]/', 'Failed Load as expected' ); +ok( !eval { $result = $api->_handle_representation('load') }, 'Load method' ); +like( $@, '/^Unable to load \[list\]/', 'Failed Load as expected' ); $result = undef; ok( !( $result = $api->Dump() ), 'Dump method' ); @@ -82,8 +77,8 @@ foreach my $e ( @{$list_should_be} ) { my $api = new_ok( $class, - [ { basedir => 't', - path_info => '/lists/todo/entry/' . $e->{md5} . '.' . $ext + [ { todo_dir => 't/lists', + path_info => '/todo/entry/' . $e->{md5} . '.' . $ext } ] );