Fix namedplaces tests #3024

pull/3360/head
Rafa de la Torre 10 years ago
parent 62eaf27912
commit 5c495dd9bd

@ -89,6 +89,7 @@ group :test do
gem 'ci_reporter', '1.8.4'
gem 'rspec-rails', '2.10.1'
gem 'poltergeist', '>= 1.0.0'
gem 'activerecord-nulldb-adapter', '0.3.1'
end
group :development, :test do

@ -30,6 +30,8 @@ GEM
activesupport (= 3.2.2)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activerecord-nulldb-adapter (0.3.1)
activerecord (>= 2.0.0)
activerecord-postgres-array (0.0.10)
activerecord
activerecord-postgresql-adapter (0.0.1)
@ -323,6 +325,7 @@ PLATFORMS
ruby
DEPENDENCIES
activerecord-nulldb-adapter (= 0.3.1)
activerecord-postgres-array
activerecord-postgresql-adapter
addressable (= 2.3.2)

@ -1,5 +1,6 @@
# encoding: utf-8
require 'active_record'
require_relative '../../lib/importer/namedplaces_guesser'
RSpec.configure do |config|
@ -10,6 +11,10 @@ module CartoDB::Importer2
describe NamedplacesGuesser do
before(:all) do
ActiveRecord::Base.establish_connection :adapter => :nulldb
end
describe '#found?' do
it 'raises an exception if not run yet' do
content_guesser = mock
@ -101,7 +106,6 @@ module CartoDB::Importer2
describe '#namedplace_guess_country' do
it "checks all candidates for a positive country guess through the geocoder api" do
pending 'make sure it can be tested without setting up connection with active record'
content_guesser = mock
namedplaces = NamedplacesGuesser.new(content_guesser)
@ -143,7 +147,6 @@ module CartoDB::Importer2
describe '#count_namedplaces_with_country_column' do
it 'queries the geocoder to get the number of namedplaces from the sample' do
pending 'make sure it can be tested without setting up connection with active record'
content_guesser = mock
namedplaces = NamedplacesGuesser.new(content_guesser)

Loading…
Cancel
Save