lib/generators/rspec/scaffold/templates/index_spec.rb in rspec-rails-5.1.2 vs lib/generators/rspec/scaffold/templates/index_spec.rb in rspec-rails-6.0.0.rc1

- old
+ new

@@ -16,10 +16,11 @@ ]) end it "renders a list of <%= ns_table_name %>" do render + cell_selector = Rails::VERSION::STRING >= '7' ? 'div>p' : 'tr>td' <% for attribute in output_attributes -%> - assert_select "tr>td", text: <%= value_for(attribute) %>.to_s, count: 2 + assert_select cell_selector, text: Regexp.new(<%= value_for(attribute) %>.to_s), count: 2 <% end -%> end end