@@ -105,7 +105,7 @@ def run_dummy_rspec(testfile = 'dummy_rspec.rb')
105105 end
106106
107107 it "working mounted engines, including Sprockets" do
108- skip if Rails . version < '4'
108+ skip if Rails . version < '4' || Rails . version >= '7'
109109 res , code = run_dummy_test 'sprockets_test.rb'
110110 assert ( code . success? )
111111 assert_match ( /Routes coverage is (\d +(.\d +)?)%/ , res )
@@ -132,15 +132,23 @@ def run_dummy_rspec(testfile = 'dummy_rspec.rb')
132132 assert_includes ( res , "Controller somespace/foo looks not existing" )
133133 assert_includes ( res , "Controller otherspace/bar looks not existing" )
134134 assert_includes ( res , "Controller subdomain_route looks not existing" )
135- assert_includes ( res , "Missing 6 actions:" )
136135
137- _ , missing_actions = res . split ( "Missing 6 actions: \n " , 2 )
138- assert_equal ( <<~TXT , missing_actions )
136+ expected_count = 6
137+ expected_output = <<~TXT
139138 dummy: create, except: %i[new create show edit destroy], only: %i[index update] , Missing custom: some_custom, not_found_error
140139 somespace/foo: index, except: %i[index new create show edit update destroy], only: %i[]
141140 otherspace/bar: index, except: %i[index new create show edit update destroy], only: %i[]
142141 subdomain_route: index, except: %i[index new create show edit update destroy], only: %i[]
143142 TXT
143+
144+ if res . include? ( 'Controller rails/welcome failed to load' ) # rails 7 has bug
145+ expected_count = 7
146+ expected_output += "rails/welcome: index, except: %i[index new create show edit update destroy], only: %i[]\n "
147+ end
148+
149+ assert_includes ( res , "Missing #{ expected_count } actions:" )
150+ _ , missing_actions = res . split ( "Missing #{ expected_count } actions:\n " , 2 )
151+ assert_equal ( expected_output , missing_actions )
144152 end
145153
146154 if defined? RSpec
0 commit comments