PERF: apply sprockets patch in a test environment (#11034)

When plugin spec is evaluated for the first time, it took 30 seconds to run:
```
rm -rf tmp/* && LOAD_PLUGINS=1 be rspec ./plugins/discourse-solved/spec/requests/topics_controller_spec.rb
```

Applying sprocket patch in test environment solves that issue
This commit is contained in:
Krzysztof Kotlarek 2020-10-27 10:17:21 +11:00 committed by GitHub
parent a5ff9fbe51
commit 61f6f53dab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@
# 2. Stop using a concatenator that does tons of work checking for semicolons when
# when rebuilding an asset
if Rails.env == "development"
if Rails.env.development? || Rails.env.test?
module ActionView::Helpers::AssetUrlHelper
def asset_path(source, options = {})