Skip to content
Snippets Groups Projects
Commit 9ce69c50 authored by Alex Reisner's avatar Alex Reisner
Browse files

Merge pull request #845 from TrangPham/rails

Test against different versions of rails
parents ff892bc3 6e61681b
No related branches found
No related tags found
No related merge requests found
......@@ -15,10 +15,20 @@ rvm:
gemfile:
- Gemfile
- gemfiles/Gemfile.ruby1.9.3
- gemfiles/Gemfile.rails3.2
- gemfiles/Gemfile.rails4.1
matrix:
exclude:
- rvm: 1.9.3
gemfile: Gemfile
- rvm: 1.9.3
gemfile: gemfiles/Gemfile.rails3.2
- rvm: 1.9.3
gemfile: gemfiles/Gemfile.rails4.1
- env: DB=
gemfile: gemfiles/Gemfile.rails3.2
- env: DB=
gemfile: gemfiles/Gemfile.rails4.1
- rvm: 2.0.0
gemfile: gemfiles/Gemfile.ruby1.9.3
- rvm: 2.1.2
......
source "https://rubygems.org"
group :development, :test do
gem 'rake'
gem 'mongoid', '2.6.0'
gem 'bson_ext', platforms: :ruby
gem 'geoip'
gem 'rubyzip'
gem 'rails', '>= 3.2'
gem 'test-unit' # needed for Ruby >=2.2.0
gem 'byebug', platforms: :mri
platforms :jruby do
gem 'jruby-openssl'
gem 'jgeoip'
end
platforms :rbx do
gem 'rubysl', '~> 2.0'
gem 'rubysl-test-unit'
end
end
group :test do
gem 'sqlite3', :platform => [:ruby, :mswin, :mingw]
platforms :ruby do
gem 'pg'
gem 'mysql2'
end
platforms :jruby do
gem 'jdbc-mysql'
gem 'jdbc-sqlite3'
gem 'activerecord-jdbcpostgresql-adapter'
end
end
\ No newline at end of file
source "https://rubygems.org"
group :development, :test do
gem 'rake'
gem 'mongoid', '4.0.2'
gem 'bson_ext', platforms: :ruby
gem 'geoip'
gem 'rubyzip'
gem 'rails', '>= 4.1'
gem 'test-unit' # needed for Ruby >=2.2.0
gem 'byebug', platforms: :mri
platforms :jruby do
gem 'jruby-openssl'
gem 'jgeoip'
end
platforms :rbx do
gem 'rubysl', '~> 2.0'
gem 'rubysl-test-unit'
end
end
group :test do
gem 'sqlite3', :platform => [:ruby, :mswin, :mingw]
platforms :ruby do
gem 'pg'
gem 'mysql2'
end
platforms :jruby do
gem 'jdbc-mysql'
gem 'jdbc-sqlite3'
gem 'activerecord-jdbcpostgresql-adapter'
end
end
\ No newline at end of file
......@@ -18,7 +18,7 @@ class LoggerTest < GeocoderTestCase
def test_set_logger_logs
assert_equal nil, Geocoder.log(:warn, "should log")
assert_equal "should log\n", @tempfile.read
assert_match /should log\n$/, @tempfile.read
end
def test_logger_does_not_log_severity_too_low
......
......@@ -26,7 +26,11 @@ class MongoidTest < GeocoderTestCase
end
def test_index_is_skipped_if_skip_option_flag
result = PlaceUsingMongoidWithoutIndex.index_options.keys.flatten[0] == :coordinates
if PlaceUsingMongoidWithoutIndex.respond_to?(:index_options)
result = PlaceUsingMongoidWithoutIndex.index_options.keys.flatten[0] == :coordinates
else
result = PlaceUsingMongoidWithoutIndex.index_specifications[0] == :coordinates
end
assert !result
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment