1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/core/mock.rb
2010-12-16 11:24:52 -08:00

34 lines
No EOL
488 B
Ruby

module Fog
@mocking = false
def self.mock!
@mocking = true
end
def self.mock?
@mocking
end
def self.mocking?
@mocking
end
module Mock
@delay = 1
def self.delay
@delay
end
def self.delay=(new_delay)
raise ArgumentError, "delay must be non-negative" unless new_delay >= 0
@delay = new_delay
end
def self.not_implemented
raise Fog::Errors::MockNotImplemented.new("Contributions welcome!")
end
end
end