Skip to content

Instantly share code, notes, and snippets.

@basti
Forked from dschneider/gist:2941985
Last active August 29, 2015 14:01
Show Gist options
  • Save basti/2bb63487196474f8a146 to your computer and use it in GitHub Desktop.
Save basti/2bb63487196474f8a146 to your computer and use it in GitHub Desktop.
RSpec - Stub Remote IP Request
allow_any_instance_of(ActionDispatch::Request).to receive(:remote_ip).and_return("192.168.0.1")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment