diff options
-rw-r--r-- | Gemfile | 1 | ||||
-rw-r--r-- | Gemfile.lock | 10 | ||||
-rw-r--r-- | actionpack/test/abstract_unit.rb | 4 | ||||
-rw-r--r-- | actionpack/test/controller/live_stream_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/dispatch/debug_exceptions_test.rb | 4 | ||||
-rw-r--r-- | actionview/test/activerecord/polymorphic_routes_test.rb | 2 | ||||
-rw-r--r-- | activemodel/test/cases/attribute_assignment_test.rb | 2 | ||||
-rw-r--r-- | activemodel/test/cases/helper.rb | 9 | ||||
-rw-r--r-- | activesupport/lib/active_support/rescuable.rb | 2 | ||||
-rw-r--r-- | activesupport/test/core_ext/object/duplicable_test.rb | 3 | ||||
-rw-r--r-- | activesupport/test/json/encoding_test.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/ruby_version_check.rb | 2 |
12 files changed, 34 insertions, 9 deletions
@@ -15,6 +15,7 @@ gem 'jquery-rails', github: 'rails/jquery-rails', branch: 'master' gem 'coffee-rails', '~> 4.1.0' gem 'turbolinks' gem 'arel', github: 'rails/arel', branch: 'master' +gem 'mail', github: 'mikel/mail' # require: false so bcrypt is loaded only when has_secure_password is used. # This is to avoid ActiveModel (and by extension the entire framework) diff --git a/Gemfile.lock b/Gemfile.lock index 4fc36bf86c..e34449a7b0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -12,6 +12,13 @@ GIT redis-namespace GIT + remote: git://github.com/mikel/mail.git + revision: b159e0a542962fdd5e292a48cfffa560d7cf412e + specs: + mail (2.6.3.edge) + mime-types (>= 1.16, < 3) + +GIT remote: git://github.com/rails/arel.git revision: aac9da257f291ad8d2d4f914528881c240848bb2 branch: master @@ -123,8 +130,6 @@ GEM nokogiri loofah (2.0.1) nokogiri (>= 1.5.9) - mail (2.6.3) - mime-types (>= 1.16, < 3) metaclass (0.0.4) mime-types (2.4.3) mini_portile (0.6.2) @@ -250,6 +255,7 @@ DEPENDENCIES jquery-rails! json kindlerb (= 0.1.1) + mail! minitest (< 5.3.4) mocha (~> 0.14) mysql (>= 2.9.0) diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index 918589f916..f5dd9d76af 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -95,7 +95,7 @@ end module ActiveSupport class TestCase include ActionDispatch::DrawOnce - if ActiveSupport::Testing::Isolation.forking_env? && PROCESS_COUNT > 0 + if RUBY_ENGINE == "ruby" && PROCESS_COUNT > 0 parallelize_me! end end @@ -479,7 +479,7 @@ class ForkingExecutor end end -if ActiveSupport::Testing::Isolation.forking_env? && PROCESS_COUNT > 0 +if RUBY_ENGINE == "ruby" && PROCESS_COUNT > 0 # Use N processes (N defaults to 4) Minitest.parallel_executor = ForkingExecutor.new(PROCESS_COUNT) end diff --git a/actionpack/test/controller/live_stream_test.rb b/actionpack/test/controller/live_stream_test.rb index 7fd1276e98..0c65270ec1 100644 --- a/actionpack/test/controller/live_stream_test.rb +++ b/actionpack/test/controller/live_stream_test.rb @@ -276,6 +276,8 @@ module ActionController end def test_async_stream + rubinius_skip "https://github.com/rubinius/rubinius/issues/2934" + @controller.latch = ActiveSupport::Concurrency::Latch.new parts = ['hello', 'world'] diff --git a/actionpack/test/dispatch/debug_exceptions_test.rb b/actionpack/test/dispatch/debug_exceptions_test.rb index 7921f05688..a867aee7ec 100644 --- a/actionpack/test/dispatch/debug_exceptions_test.rb +++ b/actionpack/test/dispatch/debug_exceptions_test.rb @@ -305,7 +305,7 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest assert_response 500 assert_select '#Application-Trace' do - assert_select 'pre code', /\(eval\):1: syntax error, unexpected/ + assert_select 'pre code', /syntax error, unexpected/ end end @@ -332,7 +332,7 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest assert_response 500 assert_select '#Application-Trace' do - assert_select 'pre code', /\(eval\):1: syntax error, unexpected/ + assert_select 'pre code', /syntax error, unexpected/ end end diff --git a/actionview/test/activerecord/polymorphic_routes_test.rb b/actionview/test/activerecord/polymorphic_routes_test.rb index 6b51775cf3..34b2698c7f 100644 --- a/actionview/test/activerecord/polymorphic_routes_test.rb +++ b/actionview/test/activerecord/polymorphic_routes_test.rb @@ -208,7 +208,7 @@ class PolymorphicRoutesTest < ActionController::TestCase @series.save polymorphic_url([nil, @series]) end - assert_match(/undefined method `series_url' for/, exception.message) + assert_match(/undefined method `series_url'/, exception.message) end end diff --git a/activemodel/test/cases/attribute_assignment_test.rb b/activemodel/test/cases/attribute_assignment_test.rb index 64a85e01eb..3b01644dd1 100644 --- a/activemodel/test/cases/attribute_assignment_test.rb +++ b/activemodel/test/cases/attribute_assignment_test.rb @@ -58,6 +58,8 @@ class AttributeAssignmentTest < ActiveModel::TestCase end test "assign private attribute" do + rubinius_skip "https://github.com/rubinius/rubinius/issues/3328" + model = Model.new assert_raises(ActiveModel::UnknownAttributeError) do model.assign_attributes(metadata: { a: 1 }) diff --git a/activemodel/test/cases/helper.rb b/activemodel/test/cases/helper.rb index 4ce6103593..3276f69f09 100644 --- a/activemodel/test/cases/helper.rb +++ b/activemodel/test/cases/helper.rb @@ -14,6 +14,15 @@ require 'active_support/testing/autorun' require 'mocha/setup' # FIXME: stop using mocha +# Skips the current run on Rubinius using Minitest::Assertions#skip +def rubinius_skip(message = '') + skip message if RUBY_ENGINE == 'rbx' +end +# Skips the current run on JRuby using Minitest::Assertions#skip +def jruby_skip(message = '') + skip message if defined?(JRUBY_VERSION) +end + # FIXME: we have tests that depend on run order, we should fix that and # remove this method call. require 'active_support/test_case' diff --git a/activesupport/lib/active_support/rescuable.rb b/activesupport/lib/active_support/rescuable.rb index 1a02acd5b1..67aac32742 100644 --- a/activesupport/lib/active_support/rescuable.rb +++ b/activesupport/lib/active_support/rescuable.rb @@ -100,7 +100,7 @@ module ActiveSupport # a string, otherwise a NameError will be raised by the interpreter # itself when rescue_from CONSTANT is executed. klass = self.class.const_get(klass_name) rescue nil - klass ||= klass_name.constantize rescue nil + klass ||= (klass_name.constantize rescue nil) klass === exception if klass end diff --git a/activesupport/test/core_ext/object/duplicable_test.rb b/activesupport/test/core_ext/object/duplicable_test.rb index d37f4bd0d8..042f5cfb34 100644 --- a/activesupport/test/core_ext/object/duplicable_test.rb +++ b/activesupport/test/core_ext/object/duplicable_test.rb @@ -9,6 +9,9 @@ class DuplicableTest < ActiveSupport::TestCase ALLOW_DUP << BigDecimal.new('4.56') def test_duplicable + rubinius_skip "* Method#dup is allowed at the moment on Rubinius\n" \ + "* https://github.com/rubinius/rubinius/issues/3089" + RAISE_DUP.each do |v| assert !v.duplicable? assert_raises(TypeError, v.class.name) { v.dup } diff --git a/activesupport/test/json/encoding_test.rb b/activesupport/test/json/encoding_test.rb index 63d921e3b4..2f269a66f0 100644 --- a/activesupport/test/json/encoding_test.rb +++ b/activesupport/test/json/encoding_test.rb @@ -130,6 +130,8 @@ class TestJSONEncoding < ActiveSupport::TestCase end def test_process_status + rubinius_skip "https://github.com/rubinius/rubinius/issues/3334" + # There doesn't seem to be a good way to get a handle on a Process::Status object without actually # creating a child process, hence this to populate $? system("not_a_real_program_#{SecureRandom.hex}") diff --git a/railties/lib/rails/ruby_version_check.rb b/railties/lib/rails/ruby_version_check.rb index aea3d2339c..e2a199ec4d 100644 --- a/railties/lib/rails/ruby_version_check.rb +++ b/railties/lib/rails/ruby_version_check.rb @@ -1,4 +1,4 @@ -if RUBY_VERSION < '2.2.0' +if RUBY_VERSION < '2.2.0' && RUBY_ENGINE == 'ruby' desc = defined?(RUBY_DESCRIPTION) ? RUBY_DESCRIPTION : "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE})" abort <<-end_message |