Skip to content

Commit cce5cba

Browse files
committed
Fix assert_no_file with unused block warning
``` $ bin/test test/generators/api_app_generator_test.rb test/generators/api_app_generator_test.rb:110: warning: the block passed to 'assert_no_file' defined at /home/zzak/code/rails/railties/lib/rails/generators/testing/assertions.rb:47 may be ignored ``` `assert_no_file` does not use the block, so it's unnecessary to keep this assertion about the contents. https://github.com/rails/rails/blob/79df80b45873590f827fdd67b485fda4ad2f58b7/railties/lib/rails/generators/testing/assertions.rb#L47
1 parent 79df80b commit cce5cba

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

railties/test/generators/api_app_generator_test.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,7 @@ def test_generator_skip_css
107107
assert_no_match(%r/gem "tailwindcss-rails"/, content)
108108
end
109109

110-
assert_no_file "app/views/layouts/application.html.erb" do |content|
111-
assert_no_match(/tailwind/, content)
112-
end
110+
assert_no_file "app/views/layouts/application.html.erb"
113111
end
114112

115113
def test_app_update_does_not_generate_unnecessary_config_files

0 commit comments

Comments
 (0)