r13930@rob-kinyons-powerbook58: rob | 2006-06-02 15:20:16 -0400
[p5sagit/Excel-Template.git] / t / 019_output.t
CommitLineData
e976988f 1use strict;
2
3use Test::More tests => 4;
4
5use lib 't';
6use mock;
7mock::reset;
8
9my $CLASS = 'Excel::Template';
10use_ok( $CLASS );
11
12my $object = $CLASS->new(
13 filename => \*DATA,
14);
15isa_ok( $object, $CLASS );
16
17ok( my $output = $object->output( 'filename' ), "Something returned" );
18
19my $val = <<__END_EXPECTED__;
20Spreadsheet::WriteExcel::new\\( 'GLOB\\([^)]+\\)' \\)
21Spreadsheet::WriteExcel::add_format\\( '' \\)
22Spreadsheet::WriteExcel::close\\( '' \\)
23__END_EXPECTED__
24
25like( $output, qr/$val/, 'Calls match up' );
26
27__DATA__
28<workbook />