Ignore:
Timestamp:
Dec 14, 2004, 6:46:00 PM (17 years ago)
Author:
kake
Message:

Encapsulate config data in OpenGuides::Config.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/t/25_write_geo_data.t

    r586 r587  
    11use strict;
    22use CGI::Wiki::Setup::SQLite;
    3 use Config::Tiny;
     3use OpenGuides::Config;
    44use OpenGuides;
    55use OpenGuides::Test;
     
    3737
    3838CGI::Wiki::Setup::SQLite::setup( { dbname => "t/node.db" } );
    39 my $config = Config::Tiny->new;
    40 $config->{_} = {
     39my $config = OpenGuides::Config->new(
     40       vars => {
    4141                 dbtype             => "sqlite",
    4242                 dbname             => "t/node.db",
     
    4848                 use_plucene        => 1,
    4949                 geo_handler        => 1,
    50                };
     50               }
     51);
    5152
    5253# First check that British National Grid will accept both OS X/Y and lat/long,
     
    102103
    103104# Now check Irish National Grid.
    104 $config->{_}{geo_handler} = 2;
     105$config->geo_handler( 2 );
    105106$guide = OpenGuides->new( config => $config );
    106107is( $guide->locator->x_field, "osie_x", "correct x field" );
     
    151152
    152153# Finally check UTM.
    153 $config->{_}{geo_handler} = 3;
    154 $config->{_}{ellipsoid} = "Airy";
     154$config->geo_handler( 3 );
     155$config->ellipsoid( "Airy" );
    155156$guide = OpenGuides->new( config => $config );
    156157is( $guide->locator->x_field, "easting", "correct x field" );
Note: See TracChangeset for help on using the changeset viewer.