File tree Expand file tree Collapse file tree
lib/solidus_dev_support/rspec Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010require 'solidus_dev_support/rspec/rails_helper'
1111require 'solidus_dev_support/rspec/capybara'
1212
13- def dev_support_assets_preload
13+ dev_support_assets_preload = -> ( * ) {
1414 if Rails . application . respond_to? ( :precompiled_assets )
1515 Rails . application . precompiled_assets
1616 else
@@ -19,18 +19,14 @@ def dev_support_assets_preload
1919 Rails . application . assets . find_asset ( asset )
2020 end
2121 end
22- end
22+ }
2323
2424RSpec . configure do |config |
2525 config . when_first_matching_example_defined ( type : :feature ) do
26- config . before :suite do
27- dev_support_assets_preload
28- end
26+ config . before :suite , &dev_support_assets_preload
2927 end
3028
3129 config . when_first_matching_example_defined ( type : :system ) do
32- config . before :suite do
33- dev_support_assets_preload
34- end
30+ config . before :suite , &dev_support_assets_preload
3531 end
3632end
You can’t perform that action at this time.
0 commit comments