summaryrefslogtreecommitdiffstats
path: root/test/unit/initializers
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-05-25 15:56:13 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-05-25 15:56:13 +0000
commitfe181c1f5568e41e2a95a08ba06246c7ada21e8b (patch)
treef1b21ca1462536ce68ebb9fa60c7bdf08558255d /test/unit/initializers
parentbbaccc347b08e09751b88f2f69c581f84bb59d8e (diff)
downloadredmine-fe181c1f5568e41e2a95a08ba06246c7ada21e8b.tar.gz
redmine-fe181c1f5568e41e2a95a08ba06246c7ada21e8b.zip
pass PatchesTest on Rails 4.0.5 (#16194)
git-svn-id: http://svn.redmine.org/redmine/trunk@13171 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/initializers')
-rw-r--r--test/unit/initializers/patches_test.rb4
1 files 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