From fcd860f489e3f81a94c91fc8945ffae2148b727e Mon Sep 17 00:00:00 2001 From: Thomas Leese Date: Tue, 28 Jun 2022 15:59:24 +0100 Subject: [PATCH] Use DfE Analytics testing This changes the way we disable DfE Analytics in our tests by using the built-in DfE Analytics fake testing mode. Note that this depends on https://github.com/DFE-Digital/dfe-analytics/pull/26. --- spec/rails_helper.rb | 1 + spec/support/dfe_analytics.rb | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) delete mode 100644 spec/support/dfe_analytics.rb diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index e8b9271a4c..44d46568fe 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -9,6 +9,7 @@ require "rspec/rails" # Add additional requires below this line. Rails is not loaded until this point! require "capybara/cuprite" +require "dfe/analytics/testing" require "view_component/test_helpers" # Requires supporting ruby files with custom matchers and macros, etc, in diff --git a/spec/support/dfe_analytics.rb b/spec/support/dfe_analytics.rb deleted file mode 100644 index ed048a6966..0000000000 --- a/spec/support/dfe_analytics.rb +++ /dev/null @@ -1,5 +0,0 @@ -RSpec.configure do |config| - config.around(:example, type: :system) do |example| - ClimateControl.modify(BIGQUERY_DISABLE: "true") { example.run } - end -end