test/support/analytics_helpers.rb
# GA is noisy in tests becayse all GA calls become console.log so we
# don't want it enabled for all tests, use this to selectively turn it on
GA is noisy in tests becayse all GA calls become console.log so we
don't want it enabled for all tests, use this to selectively turn it on
GA is noisy in tests becayse all GA calls become console . log so we don ' t want it enabled for all tests use this to selectively turn it on
def with_ga_enabled
    GovukAdminTemplate.configure { |c| c.enable_google_analytics_in_tests = true }
    yield
  ensure
    GovukAdminTemplate.configure { |c| c.enable_google_analytics_in_tests = false }
  end
def with_ga_enabled GovukAdminTemplate . configure { | c | c . enable_google_analytics_in_tests = true } yield ensure GovukAdminTemplate . configure { | c | c . enable_google_analytics_in_tests = false } end
GA is noisy in tests becayse all GA calls become console.log so we
don't want it enabled for all tests, use this to selectively turn it on
GA is noisy in tests becayse all GA calls become console . log so we don ' t want it enabled for all tests use this to selectively turn it on