Permalink
Browse files

because Rack::Test is the new hotness

  • Loading branch information...
1 parent d132657 commit 9d5496e284c340fcccb9f89cc7df4b4d78715ac0 @zapnap zapnap committed Apr 2, 2009
Showing with 8 additions and 5 deletions.
  1. +1 −1 Rakefile
  2. +6 −3 spec/application_spec.rb
  3. +1 −1 spec/spec_helper.rb
View
@@ -28,7 +28,7 @@ end
namespace :gems do
desc 'Install required gems'
task :install do
- required_gems = %w{ sinatra rspec dm-core dm-validations
+ required_gems = %w{ sinatra rspec rack-test dm-core dm-validations
dm-aggregates haml }
required_gems.each { |required_gem| system "sudo gem install #{required_gem}" }
end
View
@@ -1,12 +1,15 @@
require "#{File.dirname(__FILE__)}/spec_helper"
describe 'main application' do
- include Sinatra::Test
+ include Rack::Test::Methods
+
+ def app
+ Sinatra::Application.new
+ end
specify 'should show the default index page' do
get '/'
- @response.should be_ok
- @response.body.should match(/Main Page/)
+ last_response.should be_ok
end
specify 'should have more specs' do
View
@@ -2,7 +2,7 @@
require 'sinatra'
require 'spec'
require 'spec/interop/test'
-require 'sinatra/test'
+require 'rack/test'
# set test environment
set :environment, :test

0 comments on commit 9d5496e

Please sign in to comment.