Browse files

Link to Testing doc again and tidy up notes about deprecation

  • Loading branch information...
1 parent a513a07 commit 4e899bfe25cd84ac95fbfce746cdd2f42eda2389 @rtomayko rtomayko committed May 20, 2009
Showing with 13 additions and 12 deletions.
  1. +4 −0 documentation.markdown
  2. +9 −12 testing.markdown
@@ -15,6 +15,10 @@ A whirlwind tour of Sinatra's most interesting features.
Detailed documentation on all of Sinatra's built-in options and using `set`,
`enable`, and `disable` to configure them.
+### [Testing Sinatra with Rack::Test](testing.html)
+Guide to testing Sinatra apps.
### [Writing Extensions](extensions.html)
How to add new functionality to Sinatra using the extension APIs.
@@ -1,23 +1,21 @@
-title: Testing with Sinatra
+title: Testing Sinatra with Rack::Test
layout: default
id: testing
-Testing with Sinatra
+Testing Sinatra with Rack::Test
-**NOTE: Sinatra's built-in test framework has been deprecated. This page uses the new recommended test framework
-[Rack::Test]( instead.**
+**NOTE: Sinatra's built-in test framework has been deprecated in favor of
+[Rack::Test]( as of version
+0.9.2. This document describes testing with Rack::Test.**
All examples in the following sections assume that `Test::Unit` is being
used in an attempt to be as general as possible. See the [Test Framework
-Examples](#frameworks) for information on using Sinatra's test helpers in
+Examples](#frameworks) for information on using the test helpers in
other testing environments.
-*NOTE:* There are plenty of apps [in the wild][wild] that are using other
-testing frameworks.
Example App: `hello_world.rb`
@@ -31,7 +29,7 @@ assumed to be in a file named `hello_world.rb`:
Using The `Rack::Test::Methods` Mixin
The `Rack::Test::Methods` module includes a variety of helper methods for
simulating requests against an application and asserting expectations about
@@ -67,7 +65,7 @@ properly:
Using `Rack::Test` without the Mixin
For a variety of reasons you may not want to include `Rack::Test::Methods`
into your own classes. `Rack::Test` supports this style of testing as well, here is the above example without using Mixin.
@@ -138,7 +136,6 @@ Consider the following examples:
assert_equal 'Hello World', last_response.body
### Optional Test Setup
The `Rack::Test` mock request methods send requests to the return value of

0 comments on commit 4e899bf

Please sign in to comment.