Skip to content

Commit 8e40aef

Browse files
chanderhanrichmolj
authored andcommitted
Fix rails 5.2.0 secret_key_base error. (#81)
1 parent dc2cae4 commit 8e40aef

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

spec/rails_spec_helper.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ def generate
2626
fake_logger = Logger.new(nil)
2727
config.logger = fake_logger
2828
Rails.application.routes.default_url_options = { host: 'example.com' }
29+
30+
# fix railties 5.2.0 issue with secret_key_base
31+
# https://github.com/rails/rails/commit/7419a4f9 should take care of it
32+
# in the future.
33+
if Rails::VERSION::STRING == '5.2.0'
34+
def secret_key_base
35+
'3b7cd727ee24e8444053437c36cc66c4'
36+
end
37+
end
2938
end
3039
@app.respond_to?(:secrets) && @app.secrets.secret_key_base = '3b7cd727ee24e8444053437c36cc66c4'
3140

0 commit comments

Comments
 (0)