Class: Hyperion::FakeServer::Config

Inherits:
Object
  • Object
show all
Includes:
Headers, Logger
Defined in:
lib/hyperion_test/fake_server/config.rb

Constant Summary

Constants included from Headers

Headers::ContentTypes

Instance Method Summary collapse

Methods included from Logger

#log_result, #log_stub, #logger, #with_request_logging

Methods included from Headers

#content_type_for, #format_for, #route_headers, #short_mimetype

Instance Method Details

#allow(*args, &handler) ⇒ Object

allow(route) allow(method, path, headers={})



15
16
17
18
19
# File 'lib/hyperion_test/fake_server/config.rb', line 15

def allow(*args, &handler)
  rule = allowed_rule(args, handler)
  rules << rule
  log_stub(rule)
end

#rulesObject



9
10
11
# File 'lib/hyperion_test/fake_server/config.rb', line 9

def rules
  @rules ||= []
end