module ServiceDouble

Constants

Error
NoServerSet
NoURLSet
NotRunning
NotStarted
ServerNotFound
Timeout
UnknownFramework
VERSION

Public Class Methods

hook_into(framework) { |config| ... } click to toggle source
# File lib/service_double.rb, line 11
def self.hook_into(framework, &block)
  require_relative "service_double/frameworks/#{framework}"
  config = Configuration.new
  yield config
  manager = Manager.new(config)
  managers << manager
  manager
rescue LoadError
  raise UnknownFramework, "No hooks provided for #{framework.inspect}."
end
managers() click to toggle source
# File lib/service_double.rb, line 22
def self.managers
  @managers ||= []
end
reset() click to toggle source
# File lib/service_double.rb, line 34
def self.reset
  managers.each(&:reset)
end
start() click to toggle source
# File lib/service_double.rb, line 26
def self.start
  managers.each(&:start)
end
stop() click to toggle source
# File lib/service_double.rb, line 30
def self.stop
  managers.each(&:stop)
end