You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppress a RuboCop offense after running rails new with --devcontainer
This PR suppresses the following RuboCop offense when running `rubocop` after generating a new Rails project with `--devcontainer`:
```console
$ rails new example --devcontainer
$ cd example
$ bin/rubocop
(snip)
Offenses:
test/application_system_test_case.rb:14:1: C: [Correctable] Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body end.
```
This PR removes the following redundant blank line by default that cause the offense:
```diff
require "test_helper"
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
if ENV["CAPYBARA_SERVER_PORT"]
served_by host: "rails-app", port: ENV["CAPYBARA_SERVER_PORT"]
driven_by :selenium, using: :headless_chrome, screen_size: [ 1400, 1400 ], options: {
browser: :remote,
url: "http://#{ENV["SELENIUM_HOST"]}:4444"
}
else
driven_by :selenium, using: :headless_chrome, screen_size: [ 1400, 1400 ]
end
-
end
```
This is a similar issue to rails#52199
0 commit comments