Skip to content

Commit

Permalink
昔のRailsではsecret_key_baseの設定が必須だった
Browse files Browse the repository at this point in the history
```
  3) HealthCheck /custom_route_prefix fails with smtp server and invalid custom_check
     Failure/Error: get '/custom_route_prefix'

     RuntimeError:
       Missing `secret_key_base` for 'test' environment, set this value in `config/secrets.yml`
     # ./spec/health_check_spec.rb:24:in `block (4 levels) in <top (required)>'
     # ./spec/spec_helper.rb:24:in `start_smtp_server'
     # ./spec/health_check_spec.rb:23:in `block (3 levels) in <top (required)>'
```
  • Loading branch information
willnet committed Oct 31, 2024
1 parent ae53a2b commit 4b92931
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions spec/dummy/fake_app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
FakeApp.config.root = File.dirname(__FILE__)
FakeApp.config.action_mailer.delivery_method = :smtp
FakeApp.config.action_mailer.smtp_settings = { address: "localhost", port: 3555, openssl_verify_mode: OpenSSL::SSL::VERIFY_NONE, enable_starttls_auto: true }
FakeApp.config.secret_key_base = SecureRandom.hex(64)
FakeApp.initialize!


0 comments on commit 4b92931

Please sign in to comment.