Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove obsolete sinatra test app parts

  • Loading branch information...
commit 9316040985a4f5a06579d3a6d162659a9e362411 1 parent 750fc06
@brain-geek brain-geek authored
View
5 Gemfile
@@ -6,14 +6,9 @@ group :test do
gem 'tinder', :require => false
gem 'rake'
- gem 'thin'
- gem 'rack'
- gem 'sinatra'
gem 'fakeweb'
gem 'minitest', '~> 2.0.2', :platforms => :ruby_18
gem 'ruby-debug', :platforms => :ruby_18
-
-# gem 'ruby-debug19', :platforms => :ruby_19
end
View
12 Gemfile.lock
@@ -4,7 +4,6 @@ GEM
activesupport (3.0.3)
addressable (2.2.2)
columnize (0.3.2)
- daemons (1.1.0)
eventmachine (0.12.10)
fakeweb (1.3.0)
faraday (0.5.4)
@@ -31,14 +30,6 @@ GEM
ruby-debug-base (~> 0.10.4.0)
ruby-debug-base (0.10.4)
linecache (>= 0.3)
- sinatra (1.1.2)
- rack (~> 1.1)
- tilt (~> 1.2)
- thin (1.2.7)
- daemons (>= 1.0.9)
- eventmachine (>= 0.12.6)
- rack (>= 1.0.0)
- tilt (1.2.2)
tinder (1.4.3)
activesupport
eventmachine
@@ -60,9 +51,6 @@ DEPENDENCIES
mail
minitest (~> 2.0.2)
net-ping
- rack
rake
ruby-debug
- sinatra
- thin
tinder
View
6 test/integration/basic_application_test.rb
@@ -3,12 +3,6 @@
require 'outpost/scouts/http'
describe "basic application integration test" do
- # before(:each) do
- # @server = Server.new
- # @server.boot(TestApp)
- # @server.wait_until_booted
- # end
-
class ExampleSuccess < Outpost::Application
using Outpost::Scouts::Http => 'master http server' do
options :host => 'localhost', :port => 9595
View
6 test/integration/more_complex_test.rb
@@ -3,12 +3,6 @@
require 'outpost/scouts'
describe "using more complex application integration test" do
- # before(:each) do
- # @server = Server.new
- # @server.boot(TestApp)
- # @server.wait_until_booted
- # end
-
class ExamplePingAndHttp < Outpost::Application
using Outpost::Scouts::Http => 'master http server' do
options :host => 'localhost', :port => 9595, :path => '/'
View
6 test/integration/no_subclassing_test.rb
@@ -4,11 +4,7 @@
require 'outpost/notifiers/email'
describe "creating outpost apps without subclassing" do
- before(:each) do
- # @server = Server.new
- # @server.boot(TestApp)
- # @server.wait_until_booted
-
+ before do
Mail.defaults do
delivery_method :test
end
View
4 test/integration/reporting_test.rb
@@ -15,10 +15,6 @@ class RetrieveServerData < Outpost::Application
end
before(:each) do
- # @server = Server.new
- # @server.boot(TestApp)
- # @server.wait_until_booted
-
@outpost = RetrieveServerData.new
@outpost.run
end
View
4 test/outpost/scouts/tcp_test.rb
@@ -2,10 +2,6 @@
describe Outpost::Scouts::Tcp do
it "should set the time of ping in milliseconds" do
- # @server = Server.new
- # @server.boot(TestApp)
- # @server.wait_until_booted
-
cls = Class.new do
def initialize(host, port, timeout)
end
View
29 test/support/server.rb
@@ -1,29 +0,0 @@
-require 'rack/handler/thin'
-require 'net/http'
-
-class Server
- def wait_until_booted
- while !responsive?
- sleep 0.1
- end
- end
-
- # Got it from Capybara, but simplified it a bit.
- # lib/capybara/server.rb
- def responsive?
- res = Net::HTTP.start('localhost', 9595) { |http| http.get('/') }
-
- res.is_a?(Net::HTTPSuccess) or res.is_a?(Net::HTTPRedirection)
- rescue Errno::ECONNREFUSED, Errno::EBADF
- return false
- end
-
- def boot(app)
- if not responsive?
- Thread.new do
- Thin::Logging.silent = true
- Rack::Handler::Thin.run(app, :Port => 9595)
- end
- end
- end
-end
View
15 test/support/test_app.rb
@@ -1,15 +0,0 @@
-require 'sinatra/base'
-
-class TestApp < Sinatra::Base
- get '/' do
- [200, 'Up and running!']
- end
-
- get '/fail' do
- [500, 'Omg fail']
- end
-
- get '/warning' do
- [402, 'Omg need payment']
- end
-end
View
2  test/test_helper.rb
@@ -8,8 +8,6 @@
require 'minitest/autorun'
# Integration test helpers
-# require 'support/test_app'
-# require 'support/server'
require 'support/stubs'
require 'support/nothing_raised'
Please sign in to comment.
Something went wrong with that request. Please try again.