title: How to test Rails applications using GIS databases
body: <p>I'm developing a Rails app (3.2.8) that will use the activerecord-postgis-adapter and activerecord-spatialite-adapater gems and various rgeo plugins.</p>
  
  <p>I would like to use the Rails unit and functional tests in the traditional way, but this sort of testing is usually done with random or garbage data.  Factories and fixtures are obviously no help beyond the very simplest polygons and arrangements.</p>
  
  <p><a href="https://stackoverflow.com/questions/8866269/gis-sample-data-for-testing-performance">This</a> question provides links to freely available shapefiles, but seeding the test DB with well-understood, high-quality data does not seem like the best idea.  For example, the edge case where a region only partially contains a polygon will be missed if I use US states and counties as my test data.</p>
  
  <p>What is the best way to test this app?  Is there a factory for GIS DB's for Rails?  Is there something like Faker for using random data?  </p>