Permalink
Browse files

Reorganised folder structure for specs

  • Loading branch information...
1 parent adb8605 commit 09d9031d9dc6275bebe5f1e2e27137f1e8c0c447 @bblimke committed Aug 28, 2011
Showing with 49 additions and 2,460 deletions.
  1. +3 −3 spec/{ → acceptance/curb}/curb_spec.rb
  2. 0 spec/{ → acceptance/curb}/curb_spec_helper.rb
  3. +3 −3 spec/{ → acceptance/em_http_request}/em_http_request_spec.rb
  4. 0 spec/{ → acceptance/em_http_request}/em_http_request_spec_helper.rb
  5. +3 −3 spec/{ → acceptance/httpclient}/httpclient_spec.rb
  6. 0 spec/{ → acceptance/httpclient}/httpclient_spec_helper.rb
  7. 0 spec/{ → acceptance/net_http}/net_http_shared.rb
  8. +4 −4 spec/{ → acceptance/net_http}/net_http_spec.rb
  9. 0 spec/{ → acceptance/net_http}/net_http_spec_helper.rb
  10. +1 −1 spec/{ → acceptance/net_http}/real_net_http_spec.rb
  11. +3 −3 spec/{ → acceptance/patron}/patron_spec.rb
  12. 0 spec/{ → acceptance/patron}/patron_spec_helper.rb
  13. +3 −3 spec/{ → acceptance/typhoeus}/typhoeus_hydra_spec.rb
  14. 0 spec/{ → acceptance/typhoeus}/typhoeus_hydra_spec_helper.rb
  15. +4 −4 spec/{ → acceptance}/webmock_shared.rb
  16. +4 −2 spec/spec_helper.rb
  17. 0 spec/{ → support}/example_curl_output.txt
  18. 0 spec/{ → support}/my_rack_app.rb
  19. 0 spec/{ → support}/network_connection.rb
  20. +1 −1 spec/{ → unit}/errors_spec.rb
  21. +1 −1 spec/{ → unit}/http_lib_adapters/http_lib_adapter_registry_spec.rb
  22. +1 −1 spec/{ → unit}/http_lib_adapters/http_lib_adapter_spec.rb
  23. +1 −1 spec/{ → unit}/rack_response_spec.rb
  24. +1 −1 spec/{ → unit}/request_execution_verifier_spec.rb
  25. +1 −1 spec/{ → unit}/request_pattern_spec.rb
  26. +1 −1 spec/{ → unit}/request_registry_spec.rb
  27. +1 −1 spec/{ → unit}/request_signature_spec.rb
  28. +1 −1 spec/{ → unit}/request_stub_spec.rb
  29. +4 −4 spec/{ → unit}/response_spec.rb
  30. +1 −1 spec/{ → unit}/stub_registry_spec.rb
  31. +1 −1 spec/{ → unit}/stub_request_snippet_spec.rb
  32. +1 −1 spec/{ → unit}/util/hash_counter_spec.rb
  33. +1 −1 spec/{ → unit}/util/hash_keys_stringifier_spec.rb
  34. +1 −1 spec/{ → unit}/util/headers_spec.rb
  35. +1 −1 spec/{ → unit}/util/json_spec.rb
  36. +1 −1 spec/{ → unit}/util/uri_spec.rb
  37. +1 −1 spec/{ → unit}/webmock_spec.rb
  38. +0 −8 spec/vendor/addressable/lib/addressable/uri.rb
  39. +0 −1 spec/vendor/addressable/lib/uri.rb
  40. +0 −1 spec/vendor/crack/lib/crack.rb
  41. +0 −59 spec/vendor/right_http_connection-1.2.4/History.txt
  42. +0 −7 spec/vendor/right_http_connection-1.2.4/Manifest.txt
  43. +0 −54 spec/vendor/right_http_connection-1.2.4/README.txt
  44. +0 −103 spec/vendor/right_http_connection-1.2.4/Rakefile
  45. +0 −160 spec/vendor/right_http_connection-1.2.4/lib/net_fix.rb
  46. +0 −435 spec/vendor/right_http_connection-1.2.4/lib/right_http_connection.rb
  47. +0 −1,585 spec/vendor/right_http_connection-1.2.4/setup.rb
@@ -1,8 +1,8 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
-require 'webmock_shared'
+require 'spec_helper'
+require 'acceptance/webmock_shared'
unless RUBY_PLATFORM =~ /java/
- require 'curb_spec_helper'
+ require 'acceptance/curb/curb_spec_helper'
shared_examples_for "Curb" do
include CurbSpecHelper
File renamed without changes.
@@ -1,9 +1,9 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
-require 'webmock_shared'
+require 'spec_helper'
+require 'acceptance/webmock_shared'
require 'ostruct'
unless RUBY_PLATFORM =~ /java/
- require 'em_http_request_spec_helper'
+ require 'acceptance/em_http_request/em_http_request_spec_helper'
describe "Webmock with EM::HttpRequest" do
include EMHttpRequestSpecHelper
@@ -1,8 +1,8 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
-require 'webmock_shared'
+require 'spec_helper'
+require 'acceptance/webmock_shared'
require 'ostruct'
-require 'httpclient_spec_helper'
+require 'acceptance/httpclient/httpclient_spec_helper'
describe "Webmock with HTTPClient" do
include HTTPClientSpecHelper
@@ -1,8 +1,8 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
-require 'webmock_shared'
+require 'spec_helper'
require 'ostruct'
-require 'net_http_spec_helper'
-require 'net_http_shared'
+require 'acceptance/webmock_shared'
+require 'acceptance/net_http/net_http_spec_helper'
+require 'acceptance/net_http/net_http_shared'
include NetHTTPSpecHelper
@@ -1,9 +1,9 @@
require 'rubygems'
require 'rspec'
require 'net/http'
-require 'net_http_shared'
require 'net/https'
require 'stringio'
+require 'acceptance/net_http/net_http_shared'
require 'support/webmock_server'
describe "Real Net:HTTP without webmock", :without_webmock => true do
@@ -1,10 +1,10 @@
# encoding: utf-8
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
-require 'webmock_shared'
+require 'spec_helper'
+require 'acceptance/webmock_shared'
unless RUBY_PLATFORM =~ /java/
- require 'patron_spec_helper'
+ require 'acceptance/patron/patron_spec_helper'
require 'tmpdir'
require 'fileutils'
@@ -1,8 +1,8 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
-require 'webmock_shared'
+require 'spec_helper'
+require 'acceptance/webmock_shared'
unless RUBY_PLATFORM =~ /java/
- require 'typhoeus_hydra_spec_helper'
+ require 'acceptance/typhoeus/typhoeus_hydra_spec_helper'
describe "Webmock with Typhoeus::Hydra" do
include TyphoeusHydraSpecHelper
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
+require 'spec_helper'
unless defined? SAMPLE_HEADERS
SAMPLE_HEADERS = { "Content-Length" => "8888", "Accept" => "application/json" }
@@ -667,7 +667,7 @@ def call(request)
describe "replying raw responses from file" do
before(:each) do
- @file = File.new(File.expand_path(File.dirname(__FILE__)) + "/example_curl_output.txt")
+ @file = File.new(CURL_EXAMPLE_OUTPUT_PATH)
stub_http_request(:get, "www.example.com").to_return(@file)
@response = http_request(:get, "http://www.example.com/")
end
@@ -706,7 +706,7 @@ def call(request)
describe "replying responses raw responses from string" do
before(:each) do
- @input = File.new(File.expand_path(File.dirname(__FILE__)) + "/example_curl_output.txt").read
+ @input = File.new(CURL_EXAMPLE_OUTPUT_PATH).read
stub_http_request(:get, "www.example.com").to_return(@input)
@response = http_request(:get, "http://www.example.com/")
end
@@ -740,7 +740,7 @@ def call(request)
describe "replying raw responses evaluated dynamically" do
before(:each) do
@files = {
- "www.example.com" => File.new(File.expand_path(File.dirname(__FILE__)) + "/example_curl_output.txt")
+ "www.example.com" => File.new(CURL_EXAMPLE_OUTPUT_PATH)
}
end
View
@@ -13,9 +13,11 @@
require 'webmock/rspec'
-require 'network_connection'
+require 'support/network_connection'
require 'support/webmock_server'
-require 'my_rack_app'
+require 'support/my_rack_app'
+
+CURL_EXAMPLE_OUTPUT_PATH = File.expand_path(File.dirname(__FILE__)) + "/support/example_curl_output.txt" unless defined? CURL_EXAMPLE_OUTPUT_PATH
RSpec.configure do |config|
unless NetworkConnection.is_network_available?
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
+require 'spec_helper'
describe "errors" do
describe WebMock::NetConnectNotAllowedError do
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require 'spec_helper'
describe WebMock::HttpLibAdapterRegistry do
describe "each_adapter" do
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require 'spec_helper'
describe WebMock::HttpLibAdapter do
describe "adapter_for" do
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
+require 'spec_helper'
describe WebMock::RackResponse do
before :each do
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
+require 'spec_helper'
describe WebMock::RequestExecutionVerifier do
before(:each) do
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
+require 'spec_helper'
describe WebMock::RequestPattern do
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
+require 'spec_helper'
describe WebMock::RequestRegistry do
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
+require 'spec_helper'
describe WebMock::RequestSignature do
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
+require 'spec_helper'
describe WebMock::RequestStub do
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
+require 'spec_helper'
describe WebMock::ResponseFactory do
@@ -126,7 +126,7 @@
describe "when input is IO" do
before(:each) do
- @file = File.new(File.expand_path(File.dirname(__FILE__)) + "/example_curl_output.txt")
+ @file = File.new(CURL_EXAMPLE_OUTPUT_PATH)
@response = WebMock::Response.new(@file)
end
@@ -157,7 +157,7 @@
describe "when input is String" do
before(:each) do
- @input = File.new(File.expand_path(File.dirname(__FILE__)) + "/example_curl_output.txt").read
+ @input = File.new(CURL_EXAMPLE_OUTPUT_PATH).read
@response = WebMock::Response.new(@input)
end
@@ -241,7 +241,7 @@
describe "when raw response is evaluated" do
before(:each) do
@files = {
- "www.example.com" => File.new(File.expand_path(File.dirname(__FILE__)) + "/example_curl_output.txt")
+ "www.example.com" => File.new(CURL_EXAMPLE_OUTPUT_PATH)
}
@request_signature = WebMock::RequestSignature.new(:get, "www.example.com")
end
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
+require 'spec_helper'
describe WebMock::StubRegistry do
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
+require 'spec_helper'
describe WebMock::StubRequestSnippet do
describe "to_s" do
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require 'spec_helper'
describe WebMock::Util::HashCounter do
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require 'spec_helper'
describe WebMock::Util::HashKeysStringifier do
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require 'spec_helper'
describe WebMock::Util::Headers do
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require 'spec_helper'
describe WebMock::Util::JSON do
it "should parse json without parsing dates" do
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require 'spec_helper'
URIS_WITHOUT_PATH_OR_PARAMS =
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
+require 'spec_helper'
describe "WebMock version" do
it "should report version" do
@@ -1,8 +0,0 @@
-module Addressable
- class URI
- module CharacterClasses
- UNRESERVED = "123"
- SUB_DELIMS = "123"
- end
- end
-end
@@ -1 +0,0 @@
-
@@ -1 +0,0 @@
-
@@ -1,59 +0,0 @@
-== 0.0.1 2007-05-15
-* 1 major enhancement:
- * Initial release
-
-== 0.1.2 2007-06-27
-
-* No major changes.
-
-== 0.1.3 2007-07-09
-
-* No change.
-
-== 0.1.4 2007-08-10
-
-* r1442, todd, 2007-08-07 15:45:24
- * # 373, Add support in right_http_connection for bailing out to a block while
- reading the HTTP response (to support GET streaming...)
-
-* r1411, todd, 2007-08-03 15:14:45
- * # 373, Stream uploads (PUTs) if the source is a file, stream, or anything
- read()-able
-
-== 1.1.0 2007-08-15
-Initial public release
-
-== 1.2.0 2007-10-05
-
-* r1867, konstantin, 2007-10-05 06:19:45
- * # 220, (re)open connection to server if none exists or connection params
- have changed
-
-== 1.2.1
-
-* r2648, konstantin, 01-24-08 11:12:00
- * net_fix.rb moved from right_aws gem to fix the problem with uploading the streamable
- objects to S3
-
-* r2764, konstantin, 02-08-08 00:05:00 +03:00
- * "RightAws: incompatible Net::HTTP monkey-patch" exception is raised if our net_fix
- patch was overriden (by attachment_fu for example, to avoid this load attachment_fu
- before loading the right_http_connection gem).
-
-== 1.2.2
-
-* r3524, konstantin, 2008-04-17 11:35:42 +0400
- * Fixed a problem with incorrect error handling (connection retries always failed).
-
-== 1.2.3
-
-- Added support for setting retry & timeout parameters in the constructor
-- Improve handling of data streams during upload: if there is a failure and a retry, reset
- the seek pointer for the subsequent re-request
-
-== 1.2.4
-
-* r4984, konstantin, 2008-08-11 14:49:18 +0400
- * fixed a bug: <NoMethodError: You have a nil object when you didn't expect it!
- The error occurred while evaluating nil.body_stream>
-
@@ -1,7 +0,0 @@
-History.txt
-Manifest.txt
-README.txt
-Rakefile
-lib/net_fix.rb
-lib/right_http_connection.rb
-setup.rb
Oops, something went wrong.

0 comments on commit 09d9031

Please sign in to comment.