diff --git a/test/has_many_through_test_methods.rb b/test/has_many_through_test_methods.rb
index <HASH>..<HASH> 100644
--- a/test/has_many_through_test_methods.rb
+++ b/test/has_many_through_test_methods.rb
@@ -54,7 +54,7 @@ module HasManyThroughTestMethods
     connection = ActiveRecord::Base.connection
     groups = role.reload.permission_groups.select('right_id')
 
-    if ar_version('4.0') && !ArJdbc::AR42
+    if ar_version('4.0') && ! ar_version('4.2')
       pend 'seems to fail with MRI the same way as with JRuby!'
     end
avoid `ArJdbc` use in test method