From 834f7861e57769d47ebf4dc7ac6b57b39064f8fc Mon Sep 17 00:00:00 2001 From: Ash McKenzie Date: Wed, 28 Aug 2019 11:53:29 +1000 Subject: Add new RailsHelpers module for specs --- spec/support/helpers/rails_helpers.rb | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 spec/support/helpers/rails_helpers.rb diff --git a/spec/support/helpers/rails_helpers.rb b/spec/support/helpers/rails_helpers.rb new file mode 100644 index 00000000000..e1875b2fb15 --- /dev/null +++ b/spec/support/helpers/rails_helpers.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +module RailsHelpers + def stub_rails_env(env_name) + allow(Rails).to receive(:env).and_return(ActiveSupport::StringInquirer.new(env_name)) + end +end -- cgit v1.2.1