Files
openfoodnetwork/spec/spec_helper.rb
2023-04-12 14:23:09 +10:00

19 lines
658 B
Ruby

# frozen_string_literal: true
require 'base_spec_helper'
require 'database_cleaner'
RSpec.configure do |config|
# Precompile Webpacker assets (once) when starting the suite. The default setup can result
# in the assets getting compiled many times throughout the build, slowing it down.
config.before :suite do
Webpacker.compile
end
# Fix encoding issue in Rails 5.0; allows passing empty arrays or hashes as params.
config.before(:each, type: :controller) { @request.env["CONTENT_TYPE"] = 'application/json' }
# You can use `rspec -n` to run only failed specs.
config.example_status_persistence_file_path = "tmp/rspec-status.txt"
end