Show
Ignore:
Timestamp:
06/07/04 21:39:35 (5 years ago)
Author:
kake
Message:

Test overhaul - no longer require database access info.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/t/32_supersearch_simple_metadata.t

    r267 r361  
    1 local $^W = 1; 
    21use strict; 
    32use CGI::Wiki::Setup::SQLite; 
    43use Config::Tiny; 
    54use OpenGuides::SuperSearch; 
    6 use Test::More; 
     5use Test::More tests => 10; 
    76 
    87eval { require DBD::SQLite; }; 
     8my $have_sqlite = $@ ? 0 : 1; 
    99 
    10 if ( $@ ) { 
    11     plan skip_all => "DBD::SQLite needed to run these tests"; 
    12 } else { 
    13     plan tests => 10; 
     10SKIP: { 
     11    skip "DBD::SQLite not installed - no database to test with", 10 
     12      unless $have_sqlite; 
    1413 
    15     # Ensure the test database is set up. 
    16     CGI::Wiki::Setup::SQLite::setup( "t/sqlite.32.db" ); 
    17  
     14    CGI::Wiki::Setup::SQLite::setup( { dbname => "t/node.db" } ); 
    1815    my $config = Config::Tiny->new; 
    1916    $config->{_} = { 
    2017                     dbtype             => "sqlite", 
    21                      dbname             => "t/sqlite.32.db", 
    22                      indexing_directory => "t/index.32/", 
     18                     dbname             => "t/node.db", 
     19                     indexing_directory => "t/indexes", 
    2320                     script_name        => "wiki.cgi", 
    2421                     script_url         => "http://example.com/", 
     
    2623                     template_path      => "./templates", 
    2724                   }; 
     25 
    2826    my $search = OpenGuides::SuperSearch->new( config => $config ); 
    2927