I'm using Rails 5.1.1 and for our rspec feature tests we want would like to use precompiled assets before running all feature tests. (The main reason for this is because capybara-webkit doesn't support javascript es6 features)
The assets successfully precompile with RAILS_ENV=test rake assets:precompile
however capybara-webkit doesn't appear to use the precompiled assets.
config/environment/test.rb looks like this
config.assets.prefix = "/assets_test"
config.assets.compile = true
config.serve_static_assets = true
config.assets.js_compressor = Uglifier.new(
harmony: true #es6 support
)
What do I need to add for test to use the precompiled assets?
harmony
option wouldn't be needed when minifying (since there would be no ES6 code left to minify). – Cyclone