1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #44393 from Edouard-chin/ec-class-module-children

Add module/class nesting consistency on newly generated application:
This commit is contained in:
Gannon McGibbon 2022-02-10 15:51:10 -05:00 committed by GitHub
commit 965367e390
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 16 deletions

View file

@ -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

View file

@ -2,18 +2,20 @@ ENV["RAILS_ENV"] ||= "test"
require_relative "../config/environment"
require "rails/test_help"
class ActiveSupport::TestCase
# Run tests in parallel with specified workers
module ActiveSupport
class TestCase
# Run tests in parallel with specified workers
<% if Process.respond_to?(:fork) && !Gem.win_platform? -%>
parallelize(workers: :number_of_processors)
parallelize(workers: :number_of_processors)
<%- else -%>
parallelize(workers: :number_of_processors, with: :threads)
parallelize(workers: :number_of_processors, with: :threads)
<% end -%>
<% unless options[:skip_active_record] -%>
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
fixtures :all
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
fixtures :all
<% end -%>
# Add more helper methods to be used by all tests here...
# Add more helper methods to be used by all tests here...
end
end

View file

@ -182,7 +182,7 @@ module ApplicationTests
end
def test_code_statistics
assert_match "Code LOC: 62 Test LOC: 3 Code to Test Ratio: 1:0.0",
assert_match "Code LOC: 62 Test LOC: 5 Code to Test Ratio: 1:0.1",
rails("stats")
end