mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-29 21:17:17 +00:00
Inspecting 1509 files
......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C..............
Offenses:
spec/system/support/precompile_assets.rb:10:10: C: [Corrected] Layout/TrailingWhitespace: Trailing whitespace detected.
next if
^
spec/system/support/precompile_assets.rb:10:11: C: [Corrected] Style/ParenthesesAroundCondition: Don't use parentheses around the condition of an if.
next if ( ...
^
spec/system/support/precompile_assets.rb:13:1: C: [Corrected] Layout/TrailingWhitespace: Trailing whitespace detected.
spec/system/support/precompile_assets.rb:14:1: C: [Corrected] Layout/EmptyLines: Extra blank line detected.
1509 files inspected, 4 offenses detected, 4 offenses corrected
24 lines
702 B
Ruby
24 lines
702 B
Ruby
# frozen_string_literal: true
|
|
|
|
RSpec.configure do |config|
|
|
# Skip assets precompilcation if we exclude system specs.
|
|
# For example, you can run all non-system tests via the following command:
|
|
#
|
|
# rspec --tag ~type:system
|
|
#
|
|
# In this case, we don't need to precompile assets.
|
|
next if
|
|
config.filter.opposite.rules[:type] == "system" ||
|
|
config.exclude_pattern.match?(%r{spec/system})
|
|
|
|
config.before(:suite) do
|
|
# We can use webpack-dev-server for tests, too!
|
|
# Useful if you working on a frontend code fixes and want to verify them via system tests.
|
|
next if Webpacker.dev_server.running?
|
|
|
|
$stdout.puts "\n Precompiling assets.\n"
|
|
|
|
Webpacker.compile
|
|
end
|
|
end
|