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:
parent
462116781e
commit
e75b022f20
1 changed files with 13 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue