mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
34 lines
No EOL
488 B
Ruby
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 |