Commit | Line | Data |
b6bc5a5d |
1 | use strict; |
b6bc5a5d |
2 | |
3 | use Test::More tests => 4; |
4 | |
5 | use lib 't'; |
6 | use mock; |
c11fa570 |
7 | mock::reset; |
b6bc5a5d |
8 | |
9 | my $CLASS = 'Excel::Template'; |
10 | use_ok( $CLASS ); |
11 | |
12 | my $object = $CLASS->new( |
13 | filename => 't/003.xml', |
14 | ); |
15 | isa_ok( $object, $CLASS ); |
16 | |
17 | ok( $object->write_file( 'filename' ), 'Something returned' ); |
18 | |
c11fa570 |
19 | my @calls = mock::get_calls; |
b6bc5a5d |
20 | is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' ); |
21 | Spreadsheet::WriteExcel::new( 'filename' ) |
22 | Spreadsheet::WriteExcel::add_format( '' ) |
23 | Spreadsheet::WriteExcel::add_worksheet( '' ) |
24 | Spreadsheet::WriteExcel::Worksheet::new( '' ) |
25 | Spreadsheet::WriteExcel::add_worksheet( 'foo' ) |
26 | Spreadsheet::WriteExcel::Worksheet::new( '' ) |
27 | Spreadsheet::WriteExcel::add_worksheet( '' ) |
28 | Spreadsheet::WriteExcel::Worksheet::new( '' ) |
bf9809e5 |
29 | Spreadsheet::WriteExcel::add_worksheet( '' ) |
30 | Spreadsheet::WriteExcel::Worksheet::new( '' ) |
31 | Spreadsheet::WriteExcel::Worksheet::hide_gridlines( '2' ) |
b6bc5a5d |
32 | Spreadsheet::WriteExcel::close( '' ) |
33 | __END_EXPECTED__ |