cartodb-4.42/services/importer/spec/acceptance/acceptance_helpers.rb
2024-04-06 05:25:13 +00:00

23 lines
490 B
Ruby

module AcceptanceHelpers
def geometry_type_for(runner, user)
result = runner.results.first
table_name = result.tables.first
schema = result.schema
user.in_database[%Q{
SELECT public.GeometryType(the_geom)
FROM "#{schema}"."#{table_name}"
}].first.fetch(:geometrytype)
end
def path_to(filepath)
File.join(File.dirname(__FILE__), "../fixtures/#{filepath}")
end
def logger_double
CartoDB::Importer2::Doubles::Log.new
end
end