From eddd68f12c5301e4ad71ac1139366428c4611629 Mon Sep 17 00:00:00 2001 From: Sarah Wheeler Date: Fri, 25 Oct 2024 12:02:43 -0700 Subject: [PATCH] Stub prod env in service specs so that feature flag tests work --- modules/va_notify/spec/lib/service_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/va_notify/spec/lib/service_spec.rb b/modules/va_notify/spec/lib/service_spec.rb index c5dbaed6da..339875980f 100644 --- a/modules/va_notify/spec/lib/service_spec.rb +++ b/modules/va_notify/spec/lib/service_spec.rb @@ -7,6 +7,7 @@ before(:example, test_service: false) do test_base_url = 'http://fakeapi.com' allow_any_instance_of(VaNotify::Configuration).to receive(:base_path).and_return(test_base_url) + Rails.stub(env: ActiveSupport::StringInquirer.new("production")) end let(:test_api_key) { 'test-aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa-bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb' }