- Fixed Makefile.PL so that it uses PM_FILTER instead of rolling its own
[p5sagit/Excel-Template.git] / t / 002_workbook.t
1 use strict;
2 use warnings;
3 $|++;
4
5 use Test::More tests => 4;
6
7 use lib 't';
8 use mock;
9 mock->reset;
10
11 my $CLASS = 'Excel::Template';
12 use_ok( $CLASS );
13
14 my $object = $CLASS->new(
15     filename => 't/002.xml',
16 );
17 isa_ok( $object, $CLASS );
18
19 ok( $object->write_file( 'filename' ), 'Something returned' );
20
21 my @calls = mock->get_calls;
22 is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
23 Spreadsheet::WriteExcel::new( 'filename' )
24 Spreadsheet::WriteExcel::add_format( '' )
25 Spreadsheet::WriteExcel::close( '' )
26 __END_EXPECTED__