Skip to content

v3.10.42

Choose a tag to compare

@andrevanzuydam andrevanzuydam released this 01 Apr 11:47

What's New

  • handle(request) — New public method on RackApp for programmatic request dispatch. Test routes without starting an HTTP server or embed Tina4 in other Rack apps.
  • Full feature parity across all four Tina4 frameworks (Python, PHP, Ruby, Node.js) — 54 features each.

Usage

app = Tina4::RackApp.new
request = Tina4::Request.new(env)
status, headers, body = app.handle(request)

Or use the TestClient:

client = Tina4::TestClient.new
response = client.get("/api/users")
assert_equal 200, response.status