diff --git a/test/mongoid_test.rb b/test/mongoid_test.rb index 67e8c5016e345486749f96d9f632b6cca9f4973a..2703f4f91209391fa7d7c6f2df5a9fb71281efc3 100644 --- a/test/mongoid_test.rb +++ b/test/mongoid_test.rb @@ -1,12 +1,7 @@ # encoding: utf-8 -require 'test_helper' - -begin -require 'mongoid' require 'mongoid_test_helper' class MongoidTest < Test::Unit::TestCase - def test_geocoded_check p = Place.new(*venue_params(:msg)) p.location = [40.750354, -73.993371] @@ -25,7 +20,3 @@ class MongoidTest < Test::Unit::TestCase assert_equal p.selector[:location]['$nearSphere'], location.reverse end end - -rescue LoadError - warn 'Mongoid not installed, not tested.' -end diff --git a/test/mongoid_test_helper.rb b/test/mongoid_test_helper.rb index 69eb2fd044c593898780e3e73fb2f8463905e207..68c2af8288b592d20e417981ca69ce3d44b71234 100644 --- a/test/mongoid_test_helper.rb +++ b/test/mongoid_test_helper.rb @@ -1,5 +1,8 @@ require 'rubygems' require 'test/unit' +require 'test_helper' +require 'mongoid' +require 'geocoder/models/mongoid' $LOAD_PATH.unshift(File.dirname(__FILE__)) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))