Finished changes for v0.21 - including documentation fixes and a new renderer
[p5sagit/Excel-Template.git] / t / 004_cell.t
1 use strict;
2
3 use Test::More tests => 4;
4
5 use lib 't';
6 use mock;
7 mock::reset;
8
9 my $CLASS = 'Excel::Template';
10 use_ok( $CLASS );
11
12 my $object = $CLASS->new(
13     filename => 't/004.xml',
14 );
15 isa_ok( $object, $CLASS );
16
17 ok( $object->write_file( 'filename' ), 'Something returned' );
18
19 my @calls = mock::get_calls;
20 is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
21 Spreadsheet::WriteExcel::new( 'filename' )
22 Spreadsheet::WriteExcel::add_format( '' )
23 Spreadsheet::WriteExcel::add_worksheet( 'cell' )
24 Spreadsheet::WriteExcel::Worksheet::new( '' )
25 Spreadsheet::WriteExcel::Worksheet::write( '0', '0', 'Test1', '1' )
26 Spreadsheet::WriteExcel::Worksheet::write( '0', '1', 'Test2', '1' )
27 Spreadsheet::WriteExcel::Worksheet::write( '0', '2', '', '1' )
28 Spreadsheet::WriteExcel::close( '' )
29 __END_EXPECTED__