mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-28 01:53:25 +00:00
Allow disabling Knapsack when running RSpec tests
This commit is contained in:
@@ -6,9 +6,13 @@ require 'rubygems'
|
||||
# Require pry when we're not inside Travis-CI
|
||||
require 'pry' unless ENV['CI']
|
||||
|
||||
require 'knapsack'
|
||||
Knapsack.tracker.config({enable_time_offset_warning: false}) unless ENV['CI']
|
||||
Knapsack::Adapters::RSpecAdapter.bind
|
||||
# This spec_helper.rb is being used by the custom engines in engines/. The engines are not set up to
|
||||
# use Knapsack, and this provides the option to disable it when running the tests in CI services.
|
||||
unless ENV['DISABLE_KNAPSACK']
|
||||
require 'knapsack'
|
||||
Knapsack.tracker.config({enable_time_offset_warning: false}) unless ENV['CI']
|
||||
Knapsack::Adapters::RSpecAdapter.bind
|
||||
end
|
||||
|
||||
ENV["RAILS_ENV"] ||= 'test'
|
||||
require_relative "../config/environment"
|
||||
|
||||
Reference in New Issue
Block a user