Skip to content

Instantly share code, notes, and snippets.

@ostinelli
Created September 10, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ostinelli/2374494980fd2ddf1b25 to your computer and use it in GitHub Desktop.
Save ostinelli/2374494980fd2ddf1b25 to your computer and use it in GitHub Desktop.
Stub Rails environment
def stub_rails_env_as(env)
allow(Rails).to receive(:env).and_return(ActiveSupport::StringInquirer.new(env.to_s))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment