Skip to content

Instantly share code, notes, and snippets.

@apeckham
Created May 29, 2014 03:24
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apeckham/0d15818dec0ca74ecc5d to your computer and use it in GitHub Desktop.
Save apeckham/0d15818dec0ca74ecc5d to your computer and use it in GitHub Desktop.
factory girl sequence for an ip address
sequence(:ip_address) { |n| IPAddr.new(n, Socket::AF_INET).to_s }
# { |n| "10.0.0.#{n}" } caused spec flakiness
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment