mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-11 23:17:48 +00:00
Move related rspec config to one place
This commit is contained in:
@@ -156,6 +156,9 @@ RSpec.configure do |config|
|
||||
I18n.with_locale(locale) { example.run }
|
||||
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' }
|
||||
|
||||
# Reset all feature toggles to prevent leaking.
|
||||
config.before(:each) do
|
||||
Flipper.features.each(&:remove)
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'base_spec_helper'
|
||||
|
||||
RSpec.configure do |config|
|
||||
# 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' }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user