Class: Syntropy::TestHarness

Inherits:
Object
  • Object
show all
Defined in:
lib/syntropy/test.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ TestHarness

Returns a new instance of TestHarness.



9
10
11
12
# File 'lib/syntropy/test.rb', line 9

def initialize(app)
  @app = app
  @app.test_mode = true
end

Instance Method Details

#request(headers, body = nil) ⇒ Object



14
15
16
17
18
# File 'lib/syntropy/test.rb', line 14

def request(headers, body = nil)
  req = mock_req(headers, body)
  @app.call(req)
  req
end