Browse files

Tweaks to doc about using Rack::Test with RSpec.

Signed-off-by: Simon Rozet <>
  • Loading branch information...
baldowl authored and sr committed Jul 21, 2009
1 parent 8b7f1c4 commit 6c6b287961c3eb410611162eaf50e11dd75bd9bd
Showing with 11 additions and 7 deletions.
  1. +11 −7 testing.markdown
@@ -180,34 +180,38 @@ removed in Sinatra `1.0`.
### [RSpec][]
-Sinatra can be tested under RSpec using the `spec/interop` library. The
-`Rack::Test` module should be included within the `describe` block:
+Sinatra can be tested under plain RSpec. The `Rack::Test` module should be
+included within the `describe` block:
require 'hello_world' # <-- your sinatra app
require 'spec'
- require 'spec/interop/test'
require 'rack/test'
set :environment, :test
describe 'The HelloWorld App' do
include Rack::Test::Methods
+ def app
+ Sinatra::Application
+ end
it "says hello" do
get '/'
last_response.should be_ok
last_response.body.should == 'Hello World'
-Make `Rack::Test` available to all spec contexts by including it in
+Make `Rack::Test` available to all spec contexts by including it via
require 'spec'
- require 'spec/interop/test'
require 'rack/test'
- Test::Unit::TestCase.send :include, Rack::Test::Methods
+ Spec::Runner.configure do |conf|
+ conf.include Rack::Test::Methods
+ end
### [Bacon][]

0 comments on commit 6c6b287

Please sign in to comment.