From 4b92931713ec4c116137f94f9da9326673e4d380 Mon Sep 17 00:00:00 2001 From: Shinichi Maeshima Date: Thu, 31 Oct 2024 16:52:58 +0900 Subject: [PATCH] =?UTF-8?q?=E6=98=94=E3=81=AERails=E3=81=A7=E3=81=AFsecret?= =?UTF-8?q?=5Fkey=5Fbase=E3=81=AE=E8=A8=AD=E5=AE=9A=E3=81=8C=E5=BF=85?= =?UTF-8?q?=E9=A0=88=E3=81=A0=E3=81=A3=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` 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 ' # ./spec/spec_helper.rb:24:in `start_smtp_server' # ./spec/health_check_spec.rb:23:in `block (3 levels) in ' ``` --- spec/dummy/fake_app.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/dummy/fake_app.rb b/spec/dummy/fake_app.rb index 4e42639..290982c 100644 --- a/spec/dummy/fake_app.rb +++ b/spec/dummy/fake_app.rb @@ -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!