Module: Mountebank

Extended by:
Mountebank
Included in:
Mountebank
Defined in:
lib/mountebank.rb,
lib/mountebank/helper.rb,
lib/mountebank/network.rb,
lib/mountebank/version.rb,
lib/mountebank/imposter.rb

Defined Under Namespace

Classes: Helper, Imposter, Network, Stub, SymbolizeKeys

Constant Summary collapse

VERSION =
"0.0.1"

Class Method Summary collapse

Class Method Details

.impostersObject



17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/mountebank.rb', line 17

def self.imposters
  imposters = []

  response = Network.get('/imposters')
  if response.success?
    response.body[:imposters].each do |imposter|
      imposters << Mountebank::Imposter.new(imposter)
    end
  end

  imposters
end

.resetObject



30
31
32
33
# File 'lib/mountebank.rb', line 30

def self.reset
  response = Network.delete('/imposters')
  response.success?
end