diff --git a/test/has_scope_test.rb b/test/has_scope_test.rb
index <HASH>..<HASH> 100644
--- a/test/has_scope_test.rb
+++ b/test/has_scope_test.rb
@@ -50,7 +50,7 @@ class TreesController < ApplicationController
       false
     end
 
-    if ActionPack::VERSION::MAJOR == 5
+    if ActionPack::VERSION::MAJOR >= 5
       def default_render
         render body: action_name
       end
@@ -334,7 +334,7 @@ class HasScopeTest < ActionController::TestCase
 
   protected
 
-    if ActionPack::VERSION::MAJOR == 5
+    if ActionPack::VERSION::MAJOR >= 5
       # TODO: Remove this when we only support Rails 5.
       def get(action, params = {})
         super action, params: params
Support Rails 6 in our tests

It was checking exclusively for Rails 5 to do the necessary workarounds,
not we just check if it's the major version is higher than 5.