diff options
Diffstat (limited to 'test/unit/initializers')
-rw-r--r-- | test/unit/initializers/patches_test.rb | 4 |
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 |