diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-06-27 16:58:53 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-06-27 16:58:53 +0200 |
| commit | 420506e58fdfc84f1a5bede0a01dedf0af3bb4f3 (patch) | |
| tree | 57726b40e8aa9ccf80f874f39d3facefc0331420 /config/environments/test.rb | |
| parent | 241d5e91b2b6716e2861cc77d319c3d3568343a8 (diff) | |
Stage 7: Rails 7.2 → 8.1 on Ruby 3.2.11
- Bump Rails to 8.1.3 (Ruby unchanged at 3.2.11, new gemset rails8-upgrade)
- config.load_defaults 8.1; merge app:update diffs for all environment files
- Remove routing-filter 0.7.0; replace with native scope '(:locale)' in
routes.rb and default_url_options in ApplicationController
- Delete config/initializers/routing_filter_rails71_patch.rb
- Replace vendored TinyMCE 3.x (~200 files) with tinymce-rails ~> 8.3;
migrate admin_interface.js from jQuery .tinymce()/advanced theme to
tinymce.init(); add config/tinymce.yml; note: TinyMCE 7+ is GPL
- rails-i18n ~> 8.0 added explicitly (previously indirect dependency)
- awesome_nested_set, acts-as-taggable-on pinned to git main/master
(gemspec activerecord < 8.1 ceiling; no functional incompatibility;
repin to version once upstream releases updated gemspecs)
- globalize ~> 7.0, libxml-ruby ~> 5.0, nokogiri ~> 1.18, pg ~> 1.5
- sass-rails, coffee-rails, uglifier moved from :assets group to main
(Sprockets 4 convention; :assets group no longer meaningful)
- Node: head, draft, lock_owner marked belongs_to optional: true
- Page: node, user, editor marked belongs_to optional: true
- Static assets in public/images/ and public/javascripts/ referenced via
plain HTML tags; Rails 8 load_defaults raises on pipeline helpers for
undeclared assets
- sessions_controller_test.rb: remove stale require and dead rescue_action
- users_controller_test.rb: assert button[type=submit] not input[type=submit]
(Rails 8 button_to renders <button> not <input>)
- test_helper.rb: node.reload after children.create! (awesome_nested_set
3.9.0 does not refresh parent in memory after callback)
- 129 runs, 339 assertions, 3 failures, 0 errors — identical baseline to 7.2
Diffstat (limited to 'config/environments/test.rb')
| -rw-r--r-- | config/environments/test.rb | 54 |
1 files changed, 46 insertions, 8 deletions
diff --git a/config/environments/test.rb b/config/environments/test.rb index 48aafe8..bb89065 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb | |||
| @@ -1,17 +1,55 @@ | |||
| 1 | Cccms::Application.configure do | 1 | # The test environment is used exclusively to run your application's |
| 2 | # test suite. You never need to work with it otherwise. Remember that | ||
| 3 | # your test database is "scratch space" for the test suite and is wiped | ||
| 4 | # and recreated between test runs. Don't rely on the data there! | ||
| 2 | 5 | ||
| 6 | Rails.application.configure do | ||
| 7 | # Settings specified here will take precedence over those in config/application.rb. | ||
| 8 | |||
| 9 | # While tests run files are not watched, reloading is not necessary. | ||
| 3 | config.enable_reloading = false | 10 | config.enable_reloading = false |
| 4 | 11 | ||
| 5 | config.action_controller.consider_all_requests_local = true | 12 | # Eager loading loads your entire application. When running a single test locally, |
| 6 | config.action_controller.perform_caching = false | 13 | # this is usually not necessary, and can slow down your test suite. However, it's |
| 14 | # recommended that you enable it in continuous integration systems to ensure eager | ||
| 15 | # loading is working properly before deploying your code. | ||
| 16 | config.eager_load = ENV["CI"].present? | ||
| 17 | |||
| 18 | # Configure public file server for tests with cache-control for performance. | ||
| 19 | config.public_file_server.headers = { "cache-control" => "public, max-age=3600" } | ||
| 20 | |||
| 21 | # Show full error reports. | ||
| 22 | config.consider_all_requests_local = true | ||
| 23 | config.cache_store = :null_store | ||
| 24 | |||
| 25 | # Render exception templates for rescuable exceptions and raise for other exceptions. | ||
| 26 | config.action_dispatch.show_exceptions = :rescuable | ||
| 27 | |||
| 28 | # Disable request forgery protection in test environment. | ||
| 29 | config.action_controller.allow_forgery_protection = false | ||
| 7 | 30 | ||
| 8 | config.action_controller.allow_forgery_protection = false | 31 | # Store uploaded files on the local file system in a temporary directory. |
| 32 | config.active_storage.service = :test | ||
| 9 | 33 | ||
| 34 | # Tell Action Mailer not to deliver emails to the real world. | ||
| 35 | # The :test delivery method accumulates sent emails in the | ||
| 36 | # ActionMailer::Base.deliveries array. | ||
| 10 | config.action_mailer.delivery_method = :test | 37 | config.action_mailer.delivery_method = :test |
| 11 | 38 | ||
| 12 | config.active_support.deprecation = :log | 39 | # Set host to be used by links generated in mailer templates. |
| 40 | config.action_mailer.default_url_options = { host: "example.com" } | ||
| 41 | |||
| 42 | # Print deprecation notices to the stderr. | ||
| 43 | config.active_support.deprecation = :stderr | ||
| 44 | |||
| 45 | # Raises error for missing translations. | ||
| 46 | # config.i18n.raise_on_missing_translations = true | ||
| 47 | |||
| 48 | # Annotate rendered view with file names. | ||
| 49 | # config.action_view.annotate_rendered_view_with_filenames = true | ||
| 50 | |||
| 51 | # Raise error when a before_action's only/except options reference missing actions. | ||
| 52 | config.action_controller.raise_on_missing_callback_actions = true | ||
| 13 | 53 | ||
| 14 | config.eager_load = false | 54 | config.assets.raise_runtime_errors = false |
| 15 | config.public_file_server.enabled = true | ||
| 16 | config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' } | ||
| 17 | end | 55 | end |
