Commit | Line | Data |
e976988f |
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 => \*DATA, |
14 | ); |
15 | isa_ok( $object, $CLASS ); |
16 | |
17 | ok( my $output = $object->output( 'filename' ), "Something returned" ); |
18 | |
19 | my $val = <<__END_EXPECTED__; |
20 | Spreadsheet::WriteExcel::new\\( 'GLOB\\([^)]+\\)' \\) |
21 | Spreadsheet::WriteExcel::add_format\\( '' \\) |
22 | Spreadsheet::WriteExcel::close\\( '' \\) |
23 | __END_EXPECTED__ |
24 | |
25 | like( $output, qr/$val/, 'Calls match up' ); |
26 | |
27 | __DATA__ |
28 | <workbook /> |