1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Add helper methods for mocking.

This commit is contained in:
Rupak Ganguly 2011-12-06 14:09:20 -05:00
parent 462116781e
commit e75b022f20

View file

@ -61,6 +61,19 @@ module Fog
def self.user_id
"dev_" + Fog::Mock.random_numbers(14)
end
def self.instance_id
Fog::Mock.random_numbers(6)
end
def self.ip_address
ip = []
4.times do
ip << Fog::Mock.random_numbers(rand(3) + 1).to_i.to_s # remove leading 0
end
ip.join('.')
end
end
end