Skip to content
Browse files

add rspec tasks + update deps

  • Loading branch information...
1 parent 6677058 commit f49bbc4e3626ec92f64810d1ff83aaf42adbc742 @igrigorik committed Dec 27, 2011
Showing with 37 additions and 28 deletions.
  1. +19 −17 Gemfile.lock
  2. +8 −2 Rakefile
  3. +3 −1 examples/balancing.rb
  4. +2 −2 spec/balancing_spec.rb
  5. +3 −4 spec/helper.rb
  6. +2 −2 spec/proxy_spec.rb
View
36 Gemfile.lock
@@ -7,23 +7,26 @@ PATH
GEM
remote: http://rubygems.org/
specs:
- addressable (2.2.2)
- ansi (1.2.2)
- diff-lcs (1.1.2)
- em-http-request (0.3.0)
- addressable (>= 2.0.0)
- escape_utils
- eventmachine (>= 0.12.9)
- escape_utils (0.1.9)
- eventmachine (0.12.11)
- rspec (2.4.0)
- rspec-core (~> 2.4.0)
- rspec-expectations (~> 2.4.0)
- rspec-mocks (~> 2.4.0)
- rspec-core (2.4.0)
- rspec-expectations (2.4.0)
+ addressable (2.2.6)
+ ansi (1.4.0)
+ diff-lcs (1.1.3)
+ em-http-request (1.0.0)
+ addressable (>= 2.2.3)
+ em-socksify
+ eventmachine (>= 1.0.0.beta.3)
+ http_parser.rb (>= 0.5.2)
+ em-socksify (0.1.0)
+ eventmachine
+ eventmachine (1.0.0.beta.4)
+ http_parser.rb (0.5.3)
+ rspec (2.7.0)
+ rspec-core (~> 2.7.0)
+ rspec-expectations (~> 2.7.0)
+ rspec-mocks (~> 2.7.0)
+ rspec-core (2.7.1)
+ rspec-expectations (2.7.0)
diff-lcs (~> 1.1.2)
- rspec-mocks (2.4.0)
+ rspec-mocks (2.7.0)
PLATFORMS
ruby
@@ -32,5 +35,4 @@ DEPENDENCIES
ansi
em-http-request
em-proxy!
- eventmachine
rspec
View
10 Rakefile
@@ -1,4 +1,10 @@
require 'bundler'
-
-Bundler.setup
Bundler::GemHelper.install_tasks
+
+require 'rspec/core/rake_task'
+
+desc "Run all RSpec tests"
+RSpec::Core::RakeTask.new(:spec)
+
+task :default => :spec
+task :test => [:spec]
View
4 examples/balancing.rb
@@ -1,4 +1,6 @@
-require 'lib/em-proxy'
+$:<< '../lib' << 'lib'
+
+require 'em-proxy'
require 'ansi/code'
require 'uri'
View
4 spec/balancing_spec.rb
@@ -1,5 +1,5 @@
-require 'spec/helper'
-require 'examples/balancing'
+require 'helper'
+require File.join(File.dirname(__FILE__), '../', 'examples/balancing')
describe BalancingProxy do
View
7 spec/helper.rb
@@ -1,6 +1,5 @@
-require 'rubygems'
-require 'rspec'
-require 'pp'
+require 'bundler/setup'
require 'em-http'
+require 'pp'
-require 'lib/em-proxy'
+require 'em-proxy'
View
4 spec/proxy_spec.rb
@@ -1,4 +1,4 @@
-require 'spec/helper'
+require 'helper'
describe Proxy do
@@ -68,7 +68,7 @@ def failed
end
Proxy.start(:host => "0.0.0.0", :port => 8080) do |conn|
- conn.server :goog, :host => "google.com", :port => 80
+ conn.server :bing, :host => "google.com", :port => 80
conn.server :yhoo, :host => "yahoo.com", :port => 80
conn.on_data { |data| data }

0 comments on commit f49bbc4

Please sign in to comment.
Something went wrong with that request. Please try again.