Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add module/class nesting consistency on newly generated application:
- These two generated files are the only two that uses a compact style when defining a class, (it's not the case for their non-test counterpart i.e. https://github.com/rails/rails/blob/0f3642596f41bb323772fb7d160a3acdf0498650/railties/lib/rails/generators/rails/app/templates/app/channels/application_cable/connection.rb.tt#L1-L2). This fixes that to add some consistency and will avoid users using rubocop with the `Style/ClassAndModuleChildren: nested` rule to have to manually edit those files when generating a new app.
- Loading branch information
1 parent
bad8e77
commit 5875c68
Showing
3 changed files
with
20 additions
and
16 deletions.
There are no files selected for viewing
18 changes: 10 additions & 8 deletions
18
...ails/generators/rails/app/templates/test/channels/application_cable/connection_test.rb.tt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
require "test_helper" | ||
|
||
class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase | ||
# test "connects with cookies" do | ||
# cookies.signed[:user_id] = 42 | ||
# | ||
# connect | ||
# | ||
# assert_equal connection.user_id, "42" | ||
# end | ||
module ApplicationCable | ||
class ConnectionTest < ActionCable::Connection::TestCase | ||
# test "connects with cookies" do | ||
# cookies.signed[:user_id] = 42 | ||
# | ||
# connect | ||
# | ||
# assert_equal connection.user_id, "42" | ||
# end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters