Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test against JRuby and Rubinius #2859

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -12,6 +12,8 @@ script:
rvm: rvm:
- 1.9.3 - 1.9.3
- 2.1.2 - 2.1.2
- rbx-2
- jruby
env: env:
matrix: matrix:
- RAILS=3.2.19 - RAILS=3.2.19
Expand Down
7 changes: 5 additions & 2 deletions Gemfile
@@ -1,5 +1,4 @@
source 'https://rubygems.org' source 'https://rubygems.org'

gemspec gemspec


require File.expand_path 'spec/support/detect_rails_version', File.dirname(__FILE__) require File.expand_path 'spec/support/detect_rails_version', File.dirname(__FILE__)
Expand All @@ -17,6 +16,10 @@ gem 'pundit'
gem 'rake', require: false gem 'rake', require: false
gem 'parallel_tests' gem 'parallel_tests'


gem RUBY_ENGINE =~ /jruby/ ? 'activerecord-jdbcsqlite3-adapter' : 'sqlite3'

gem 'rubysl' if RUBY_ENGINE =~ /rbx/

group :development do group :development do
# Debugging # Debugging
gem 'pry' # Easily debug from your console with `binding.pry` gem 'pry' # Easily debug from your console with `binding.pry`
Expand Down Expand Up @@ -45,6 +48,6 @@ group :test do
gem 'rails-i18n' # Provides default i18n for many languages gem 'rails-i18n' # Provides default i18n for many languages
gem 'rspec' gem 'rspec'
gem 'rspec-rails' gem 'rspec-rails'
gem 'rubinius-coverage' if RUBY_ENGINE =~ /rbx/ # colszowka/simplecov#250
gem 'shoulda-matchers' gem 'shoulda-matchers'
gem 'sqlite3'
end end
5 changes: 5 additions & 0 deletions spec/requests/memory_spec.rb
@@ -1,6 +1,11 @@
require 'rails_helper' require 'rails_helper'


<<<<<<< HEAD:spec/requests/memory_spec.rb
describe "Memory Leak", :type => :request do describe "Memory Leak", :type => :request do
=======
describe "Memory Leak" do
JRuby.objectspace = true if RUBY_ENGINE =~ /jruby/
>>>>>>> test against JRuby and Rubinius:spec/integration/memory_spec.rb


def count_instances_of(klass) def count_instances_of(klass)
ObjectSpace.each_object(klass) { } ObjectSpace.each_object(klass) { }
Expand Down