use Test::More tests => 3; use My::Module; my $object = My::Module->new(); # test that the object exists ok( $object->isa('My::Module' , "Our object is in the right class"); my $content = $object->get_file_contents( { file_name => '/home/trs80/file.txt' } ); ok( $content ne '' , "\$content has something in it!" ); ok( $content =~ /string/ , "\$content contains string!" ); 1;