未验证 提交 79bc9e81 编写于 作者: E Eileen M. Uchitelle 提交者: GitHub

Merge pull request #35126 from alkesh26/railities-typo-fix

Railties typo fixes.
...@@ -54,6 +54,6 @@ def self.plugin_rails_init(options) ...@@ -54,6 +54,6 @@ def self.plugin_rails_init(options)
end end
end end
# Backwardscompatibility with Rails 5.0 generated plugin test scripts # Backwards compatibility with Rails 5.0 generated plugin test scripts
mattr_reader :run_via, default: {} mattr_reader :run_via, default: {}
end end
...@@ -23,7 +23,7 @@ module AppLoader # :nodoc: ...@@ -23,7 +23,7 @@ module AppLoader # :nodoc:
# too that you may or may not want (like yarn) # too that you may or may not want (like yarn)
If you already have Rails binstubs in source control, you might be If you already have Rails binstubs in source control, you might be
inadverently overwriting them during deployment by using bundle install inadvertently overwriting them during deployment by using bundle install
with the --binstubs option. with the --binstubs option.
If your application was created prior to Rails 4, here's how to upgrade: If your application was created prior to Rails 4, here's how to upgrade:
......
...@@ -16,7 +16,7 @@ def teardown ...@@ -16,7 +16,7 @@ def teardown
teardown_app teardown_app
end end
def test_run_via_backwardscompatibility def test_run_via_backwards_compatibility
require "minitest/rails_plugin" require "minitest/rails_plugin"
assert_nothing_raised do assert_nothing_raised do
......
...@@ -63,7 +63,7 @@ class Rails::Command::CredentialsCommandTest < ActiveSupport::TestCase ...@@ -63,7 +63,7 @@ class Rails::Command::CredentialsCommandTest < ActiveSupport::TestCase
end end
end end
test "edit command does not raise when an initializer tries to acces non-existent credentials" do test "edit command does not raise when an initializer tries to access non-existent credentials" do
app_file "config/initializers/raise_when_loaded.rb", <<-RUBY app_file "config/initializers/raise_when_loaded.rb", <<-RUBY
Rails.application.credentials.missing_key! Rails.application.credentials.missing_key!
RUBY RUBY
......
...@@ -112,9 +112,9 @@ def test_mysql ...@@ -112,9 +112,9 @@ def test_mysql
end end
def test_mysql_full def test_mysql_full
start(adapter: "mysql2", database: "db", host: "locahost", port: 1234, socket: "socket", username: "user", password: "qwerty", encoding: "UTF-8") start(adapter: "mysql2", database: "db", host: "localhost", port: 1234, socket: "socket", username: "user", password: "qwerty", encoding: "UTF-8")
assert_not aborted assert_not aborted
assert_equal [%w[mysql mysql5], "--host=locahost", "--port=1234", "--socket=socket", "--user=user", "--default-character-set=UTF-8", "-p", "db"], dbconsole.find_cmd_and_exec_args assert_equal [%w[mysql mysql5], "--host=localhost", "--port=1234", "--socket=socket", "--user=user", "--default-character-set=UTF-8", "-p", "db"], dbconsole.find_cmd_and_exec_args
end end
def test_mysql_include_password def test_mysql_include_password
......
...@@ -199,7 +199,7 @@ def test_app_update_generates_correct_session_key ...@@ -199,7 +199,7 @@ def test_app_update_generates_correct_session_key
end end
end end
def test_new_application_use_json_serialzier def test_new_application_use_json_serializer
run_generator run_generator
assert_file("config/initializers/cookies_serializer.rb", /Rails\.application\.config\.action_dispatch\.cookies_serializer = :json/) assert_file("config/initializers/cookies_serializer.rb", /Rails\.application\.config\.action_dispatch\.cookies_serializer = :json/)
......
...@@ -119,7 +119,7 @@ def test_logs_if_the_template_engine_cannot_be_found ...@@ -119,7 +119,7 @@ def test_logs_if_the_template_engine_cannot_be_found
assert_match(/haml \[not found\]/, content) assert_match(/haml \[not found\]/, content)
end end
def test_mailer_with_namedspaced_mailer def test_mailer_with_namespaced_mailer
run_generator ["Farm::Animal", "moos"] run_generator ["Farm::Animal", "moos"]
assert_file "app/mailers/farm/animal_mailer.rb" do |mailer| assert_file "app/mailers/farm/animal_mailer.rb" do |mailer|
assert_match(/class Farm::AnimalMailer < ApplicationMailer/, mailer) assert_match(/class Farm::AnimalMailer < ApplicationMailer/, mailer)
......
...@@ -104,7 +104,7 @@ def test_migration_with_nested_namespace_without_pluralization ...@@ -104,7 +104,7 @@ def test_migration_with_nested_namespace_without_pluralization
ActiveRecord::Base.pluralize_table_names = true ActiveRecord::Base.pluralize_table_names = true
end end
def test_migration_with_namespaces_in_model_name_without_plurization def test_migration_with_namespaces_in_model_name_without_pluralization
ActiveRecord::Base.pluralize_table_names = false ActiveRecord::Base.pluralize_table_names = false
run_generator ["Gallery::Image"] run_generator ["Gallery::Image"]
assert_migration "db/migrate/create_gallery_image", /class CreateGalleryImage < ActiveRecord::Migration\[[0-9.]+\]/ assert_migration "db/migrate/create_gallery_image", /class CreateGalleryImage < ActiveRecord::Migration\[[0-9.]+\]/
......
...@@ -442,7 +442,7 @@ def test_creating_dummy_without_tests_but_with_dummy_path ...@@ -442,7 +442,7 @@ def test_creating_dummy_without_tests_but_with_dummy_path
end end
end end
def test_dummy_appplication_skip_listen_by_default def test_dummy_application_skip_listen_by_default
run_generator run_generator
assert_file "test/dummy/config/environments/development.rb" do |contents| assert_file "test/dummy/config/environments/development.rb" do |contents|
......
...@@ -483,7 +483,7 @@ class ActiveSupport::TestCase ...@@ -483,7 +483,7 @@ class ActiveSupport::TestCase
Dir.chdir(app_template_path) { `yarn add https://github.com/rails/webpacker.git` } # Use the latest version. Dir.chdir(app_template_path) { `yarn add https://github.com/rails/webpacker.git` } # Use the latest version.
# Manually install `webpack` as bin symlinks are not created for subdependencies # Manually install `webpack` as bin symlinks are not created for sub dependencies
# in workspaces. See https://github.com/yarnpkg/yarn/issues/4964 # in workspaces. See https://github.com/yarnpkg/yarn/issues/4964
Dir.chdir(app_template_path) { `yarn add webpack@4.17.1 --tilde` } Dir.chdir(app_template_path) { `yarn add webpack@4.17.1 --tilde` }
Dir.chdir(app_template_path) { `yarn add webpack-cli` } Dir.chdir(app_template_path) { `yarn add webpack-cli` }
......
...@@ -232,7 +232,7 @@ def app ...@@ -232,7 +232,7 @@ def app
get "/someone/blog/generate_application_route" get "/someone/blog/generate_application_route"
assert_equal "/", last_response.body assert_equal "/", last_response.body
get "/somone/blog/application_route_in_view" get "/someone/blog/application_route_in_view"
assert_equal "/", last_response.body assert_equal "/", last_response.body
# test generating engine's route from other engine # test generating engine's route from other engine
...@@ -258,8 +258,8 @@ def app ...@@ -258,8 +258,8 @@ def app
assert_equal "http://example.org/anonymous/blog/posts/44", last_response.body assert_equal "http://example.org/anonymous/blog/posts/44", last_response.body
# test that correct path is generated for the same polymorphic_path call in an engine # test that correct path is generated for the same polymorphic_path call in an engine
get "/somone/blog/engine_polymorphic_path" get "/someone/blog/engine_polymorphic_path"
assert_equal "/somone/blog/posts/44", last_response.body assert_equal "/someone/blog/posts/44", last_response.body
# and in an application # and in an application
get "/application_polymorphic_path" get "/application_polymorphic_path"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册