1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

document testing with rspec

This commit is contained in:
Simon Rozet 2008-09-27 12:29:27 +02:00
parent 7cfe04a905
commit 10c90d5f87

View file

@ -397,7 +397,7 @@ typically don't have to +use+ them explicitly.
end
=== Specs
=== Test/Spec
require 'rubygems'
require 'sinatra'
@ -411,6 +411,26 @@ typically don't have to +use+ them explicitly.
should.be.ok
body.should.equal 'My Default Page!'
end
...
end
=== RSpec
require 'rubygems'
require 'spec'
require 'sinatra'
require 'sinatra/test/rspec'
require 'my_sinatra_app'
describe 'My app' do
it 'should show a default page' do
get_it '/'
@response.should be_ok
@response.body.should == 'My Default Page!'
end
...
end