We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94af079 commit bd9158dCopy full SHA for bd9158d
lib/generators/rspec/scaffold/templates/index_spec.rb
@@ -18,8 +18,9 @@
18
19
it "renders a list of <%= ns_table_name %>" do
20
render
21
+ cell_selector = Rails::VERSION::STRING >= '7' ? 'div>p' : 'tr>td'
22
<% for attribute in output_attributes -%>
- assert_select "tr>td", text: <%= value_for(attribute) %>.to_s, count: 2
23
+ assert_select cell_selector, text: Regexp.new(<%= value_for(attribute) %>.to_s), count: 2
24
<% end -%>
25
end
26
0 commit comments