From da44e19db6a3e3906f2f2a524250efac690e7cab Mon Sep 17 00:00:00 2001 From: Sean Linsley Date: Sun, 12 Jan 2014 01:35:34 -0600 Subject: [PATCH] test against JRuby and Rubinius --- .travis.yml | 2 ++ Gemfile | 7 +++++-- spec/integration/memory_spec.rb | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 51e5a68812e..657871dacb7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,8 @@ script: rvm: - 1.9.3 - 2.1.2 + - rbx-2 + - jruby env: matrix: - RAILS=3.2.18 diff --git a/Gemfile b/Gemfile index 466f79e5331..418a3f40d0d 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,4 @@ source 'https://rubygems.org' - gemspec ACTIVE_ADMIN_PATH = File.dirname(__FILE__) unless defined?(ACTIVE_ADMIN_PATH) @@ -21,6 +20,10 @@ gem 'devise' gem 'draper' gem 'pundit' +gem RUBY_ENGINE =~ /jruby/ ? 'activerecord-jdbcsqlite3-adapter' : 'sqlite3' + +gem 'rubysl' if RUBY_ENGINE =~ /rbx/ + group :development do # Debugging gem 'pry' # Easily debug from your console with `binding.pry` @@ -50,6 +53,6 @@ group :test do gem 'parallel_tests' gem 'rails-i18n' # Provides default i18n for many languages gem 'rspec-rails' + gem 'rubinius-coverage' if RUBY_ENGINE =~ /rbx/ # colszowka/simplecov#250 gem 'shoulda-matchers' - gem 'sqlite3' end diff --git a/spec/integration/memory_spec.rb b/spec/integration/memory_spec.rb index 3f26627de6a..0466f932f89 100644 --- a/spec/integration/memory_spec.rb +++ b/spec/integration/memory_spec.rb @@ -1,6 +1,7 @@ require 'spec_helper' describe "Memory Leak" do + JRuby.objectspace = true if RUBY_ENGINE =~ /jruby/ def count_instances_of(klass) ObjectSpace.each_object(klass) { }