From fe181c1f5568e41e2a95a08ba06246c7ada21e8b Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 25 May 2014 15:56:13 +0000 Subject: pass PatchesTest on Rails 4.0.5 (#16194) git-svn-id: http://svn.redmine.org/redmine/trunk@13171 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/initializers/patches_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/initializers/patches_test.rb b/test/unit/initializers/patches_test.rb index ec39a0294..ac4b12b43 100644 --- a/test/unit/initializers/patches_test.rb +++ b/test/unit/initializers/patches_test.rb @@ -51,7 +51,7 @@ class PatchesTest < ActiveSupport::TestCase def test_indifferent_select hash = ActiveSupport::HashWithIndifferentAccess.new(@symbols).select { |_ ,v| v == 1 } assert_equal({ 'a' => 1 }, hash) - assert_instance_of (RUBY_VERSION < "2.1" ? + assert_instance_of ((Rails::VERSION::MAJOR < 4 && RUBY_VERSION < "2.1") ? Hash : ActiveSupport::HashWithIndifferentAccess), hash end @@ -82,7 +82,7 @@ class PatchesTest < ActiveSupport::TestCase assert_equal @keys, @ordered_hash.select { true }.map(&:first) new_ordered_hash = @ordered_hash.select { true } assert_equal @keys, new_ordered_hash.map(&:first) - assert_instance_of (RUBY_VERSION < "2.1" ? + assert_instance_of ((Rails::VERSION::MAJOR < 4 && RUBY_VERSION < "2.1") ? Hash : ActiveSupport::OrderedHash), new_ordered_hash end -- cgit v1.2.3