Sha256: 725b2acb3ee30529ee3b781387fc685da61a60ce8b21cf633df78419d957fd7d
Contents?: true
Size: 641 Bytes
Versions: 18
Compression:
Stored size: 641 Bytes
Contents
class MockShip attr_accessor :name, :ports, :image_id, :flavor, :region, :username, :dns def initialize @dns = "my.ip.address" end def wait_for_sshd @dns = "#{@name}.my.ip" return true end end class MockFleet attr_accessor :ships @@attempts = 0 def initialize @ships = [] end def add type @ships << MockShip.new yield(@ships[-1]) @ships[-1] end def start if @@attempts < 1 @@attempts += 1 raise Fog::Errors::Error end end def destroy end end class MockBlimpy @@fleet = nil def self.fleet yield(@@fleet = MockFleet.new) @@fleet end end
Version data entries
18 entries across 18 versions & 1 rubygems