Skip to content

Commit

Permalink
because Rack::Test is the new hotness
Browse files Browse the repository at this point in the history
  • Loading branch information
zapnap committed Apr 2, 2009
1 parent d132657 commit 9d5496e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions spec/application_spec.rb
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Expand Up @@ -2,7 +2,7 @@
require 'sinatra'
require 'spec'
require 'spec/interop/test'
require 'sinatra/test'
require 'rack/test'

# set test environment
set :environment, :test
Expand Down

0 comments on commit 9d5496e

Please sign in to comment.