From 28b12858d67563dafca1f328e7251fa3c6f63ad0 Mon Sep 17 00:00:00 2001 From: Blake Mizerany Date: Tue, 15 Apr 2008 19:10:48 -0700 Subject: [PATCH] better docs on testing --- README.rdoc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.rdoc b/README.rdoc index 9d585162..3911dfc3 100644 --- a/README.rdoc +++ b/README.rdoc @@ -345,6 +345,20 @@ When using send_file or static files you may have mime types Sinatra doesn't und = Testing +=== Methods + + get_it path, params + get_it path, params.merge(:env => { 'HTTP_HOST' => 'www.sinatrarb.com' }) or + get_it path, params.merge(:env => { :host => 'www.sinatrarb.com' }) + +RESTful: + + post_it '/foo', '', 'HTTP_ACCEPT' => 'application/xml' + +also works with: + + get_it, post_it, put_it, delete_it, head_it + === Test/Unit require 'my_sinatra_app'