Sha256: c3f5a400e673753399e1b7c8adb1b3be94aa37805f171c5a40c523fb3c66329d

Contents?: true

Size: 372 Bytes

Versions: 1

Compression:

Stored size: 372 Bytes

Contents

require "simplenet/client"
$LOAD_PATH.unshift(File.dirname(__FILE__) + "/support")

def random_name_for name
  "#{name}#{rand(99999)}"
end

def random_cidr
  "10.#{rand(256)}.#{rand(256)}.0/24"
end

def random_ip(cidr=nil)
  cidr ||= random_cidr

  ip = cidr.split(".")
  ip[-1] = rand(256)
  ip.join(".")
end

def random_mac
  (1..6).map{"%0.2X"%rand(256)}.join(":")
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
simplenet-client-0.2.0 ./spec/spec_helper.rb