DEV: attempt to report last exception as the "cause" for failures

This allows our request specs to report exceptions so we can debug

May have a few false positives but generally should be quiet

TODO only wire magic in for request specs, currently happens for all
This commit is contained in:
Sam
2018-05-21 17:01:30 +10:00
parent e78f1d7589
commit ec337bbcb3
2 changed files with 43 additions and 0 deletions

View File

@ -50,6 +50,10 @@ Discourse::Application.configure do
config.log_level = :fatal
end
if defined? RspecErrorTracker
config.middleware.insert_after ActionDispatch::Flash, RspecErrorTracker
end
config.after_initialize do
SiteSetting.defaults.tap do |s|
s.set_regardless_of_locale(:s3_upload_bucket, 'bucket')