Fixed typo, HIDE_GRIDLINES instead of HIDE_GRIDLINE
[p5sagit/Excel-Template.git] / t / 016_renderers.t
CommitLineData
6dd4c89d 1use strict;
2
3use Test::More tests => 10;
4
5use lib 't';
6use mock;
7
8my $CLASS = 'Excel::Template';
9use_ok( $CLASS );
10
11{
c11fa570 12 mock::reset;
6dd4c89d 13 my $object = $CLASS->new(
14 renderer => 'big',
15 filename => 't/016.xml',
16 );
17 isa_ok( $object, $CLASS );
18
19 ok( $object->write_file( 'filename' ), 'Something returned' );
20
c11fa570 21 my @calls = mock::get_calls;
6dd4c89d 22 is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
23Spreadsheet::WriteExcel::Big::new( 'filename' )
24Spreadsheet::WriteExcel::Big::add_format( '' )
25Spreadsheet::WriteExcel::Big::close( '' )
26__END_EXPECTED__
27}
28
29{
c11fa570 30 mock::reset;
6dd4c89d 31 my $object = $CLASS->new(
32 renderer => Excel::Template->RENDER_XML,
33 filename => 't/016.xml',
34 );
35 isa_ok( $object, $CLASS );
36
37 ok( $object->write_file( 'filename' ), 'Something returned' );
38
c11fa570 39 my @calls = mock::get_calls;
6dd4c89d 40 is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
41Spreadsheet::WriteExcelXML::new( 'filename' )
9ee3aea0 42Spreadsheet::WriteExcelXML::add_format( '' )
6dd4c89d 43Spreadsheet::WriteExcelXML::close( '' )
44__END_EXPECTED__
45}
46
47{
c11fa570 48 mock::reset;
6dd4c89d 49 my $object = $CLASS->new(
50 renderer => Excel::Template->RENDER_NML,
51 filename => 't/016.xml',
52 );
53 isa_ok( $object, $CLASS );
54
55 ok( $object->write_file( 'filename' ), 'Something returned' );
56
c11fa570 57 my @calls = mock::get_calls;
6dd4c89d 58 is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
59Spreadsheet::WriteExcel::new( 'filename' )
9ee3aea0 60Spreadsheet::WriteExcel::add_format( '' )
6dd4c89d 61Spreadsheet::WriteExcel::close( '' )
62__END_EXPECTED__
63}