-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from test to spec, add internal test server
- Loading branch information
Kevin Ball
committed
Aug 20, 2009
1 parent
58a3bd3
commit cf077f7
Showing
4 changed files
with
65 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
require File.dirname(__FILE__) + '/../lib/curl-multi' | ||
require File.dirname(__FILE__) + '/test_server.rb' | ||
require 'spec/autorun' | ||
require 'spork' | ||
|
||
Spork.prefork do | ||
Spec::Runner.configure do |config| | ||
config.mock_with :mocha | ||
end | ||
end | ||
|
||
Spork.each_run do | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
require 'rubygems' | ||
require 'sinatra/base' | ||
|
||
class CurlTestServer < Sinatra::Base | ||
get '/sleep/:time' do | ||
sleep(params[:time].to_f) | ||
"ok" | ||
end | ||
|
||
get '/ok' do | ||
"ok" | ||
end | ||
|
||
get '/error' do | ||
raise | ||
end | ||
|
||
get '/redirect/:dest' do | ||
redirect params[:dest] | ||
end | ||
post '/flush' do | ||
$stdout.flush | ||
$stderr.flush | ||
'ok' | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.