Created
September 10, 2015 14:10
-
-
Save ostinelli/2374494980fd2ddf1b25 to your computer and use it in GitHub Desktop.
Stub Rails environment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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