summaryrefslogtreecommitdiff
path: root/spec/rubyspec/library/uri
diff options
context:
space:
mode:
Diffstat (limited to 'spec/rubyspec/library/uri')
-rw-r--r--spec/rubyspec/library/uri/decode_www_form_component_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/decode_www_form_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/encode_www_form_component_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/encode_www_form_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/eql_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/equality_spec.rb46
-rw-r--r--spec/rubyspec/library/uri/escape/decode_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/escape/encode_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/escape/escape_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/escape/unescape_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/extract_spec.rb86
-rw-r--r--spec/rubyspec/library/uri/fixtures/classes.rb11
-rw-r--r--spec/rubyspec/library/uri/fixtures/normalization.rb54
-rw-r--r--spec/rubyspec/library/uri/ftp/build_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/ftp/merge_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/ftp/new2_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/ftp/path_spec.rb26
-rw-r--r--spec/rubyspec/library/uri/ftp/set_typecode_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/ftp/to_s_spec.rb15
-rw-r--r--spec/rubyspec/library/uri/ftp/typecode_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/generic/absolute_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/generic/build2_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/build_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/coerce_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/component_ary_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/component_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/generic/default_port_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/generic/eql_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/equal_value_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/fragment_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/generic/hash_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/hierarchical_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/host_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/generic/inspect_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/merge_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/generic/minus_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/normalize_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/generic/opaque_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/generic/password_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/generic/path_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/generic/plus_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/port_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/generic/query_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/generic/registry_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/generic/relative_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/route_from_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/route_to_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/scheme_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/generic/select_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/set_fragment_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/set_host_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/set_opaque_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/set_password_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/set_path_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/set_port_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/set_query_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/set_registry_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/set_scheme_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/set_user_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/set_userinfo_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/to_s_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/use_registry_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/generic/user_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/generic/userinfo_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/http/build_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/http/request_uri_spec.rb16
-rw-r--r--spec/rubyspec/library/uri/join_spec.rb57
-rw-r--r--spec/rubyspec/library/uri/ldap/attributes_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/ldap/build_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/ldap/dn_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/ldap/extensions_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/ldap/filter_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/ldap/hierarchical_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/ldap/scope_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/ldap/set_attributes_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/ldap/set_dn_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/ldap/set_extensions_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/ldap/set_filter_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/ldap/set_scope_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/mailto/build_spec.rb98
-rw-r--r--spec/rubyspec/library/uri/mailto/headers_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/mailto/set_headers_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/mailto/set_to_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/mailto/to_mailtext_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/mailto/to_rfc822text_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/mailto/to_s_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/mailto/to_spec.rb10
-rw-r--r--spec/rubyspec/library/uri/merge_spec.rb20
-rw-r--r--spec/rubyspec/library/uri/normalize_spec.rb35
-rw-r--r--spec/rubyspec/library/uri/parse_spec.rb203
-rw-r--r--spec/rubyspec/library/uri/parser/escape_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/parser/extract_spec.rb7
-rw-r--r--spec/rubyspec/library/uri/parser/inspect_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/parser/join_spec.rb7
-rw-r--r--spec/rubyspec/library/uri/parser/make_regexp_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/parser/parse_spec.rb7
-rw-r--r--spec/rubyspec/library/uri/parser/split_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/parser/unescape_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/plus_spec.rb459
-rw-r--r--spec/rubyspec/library/uri/regexp_spec.rb18
-rw-r--r--spec/rubyspec/library/uri/route_from_spec.rb23
-rw-r--r--spec/rubyspec/library/uri/route_to_spec.rb26
-rw-r--r--spec/rubyspec/library/uri/select_spec.rb31
-rw-r--r--spec/rubyspec/library/uri/set_component_spec.rb47
-rw-r--r--spec/rubyspec/library/uri/shared/eql.rb17
-rw-r--r--spec/rubyspec/library/uri/shared/extract.rb83
-rw-r--r--spec/rubyspec/library/uri/shared/join.rb54
-rw-r--r--spec/rubyspec/library/uri/shared/parse.rb199
-rw-r--r--spec/rubyspec/library/uri/split_spec.rb6
-rw-r--r--spec/rubyspec/library/uri/uri_spec.rb29
-rw-r--r--spec/rubyspec/library/uri/util/make_components_hash_spec.rb6
111 files changed, 0 insertions, 2284 deletions
diff --git a/spec/rubyspec/library/uri/decode_www_form_component_spec.rb b/spec/rubyspec/library/uri/decode_www_form_component_spec.rb
deleted file mode 100644
index 04cc634947..0000000000
--- a/spec/rubyspec/library/uri/decode_www_form_component_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI.decode_www_form_component" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/decode_www_form_spec.rb b/spec/rubyspec/library/uri/decode_www_form_spec.rb
deleted file mode 100644
index d4854a6ece..0000000000
--- a/spec/rubyspec/library/uri/decode_www_form_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI.decode_www_form" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/encode_www_form_component_spec.rb b/spec/rubyspec/library/uri/encode_www_form_component_spec.rb
deleted file mode 100644
index 753b6d50d0..0000000000
--- a/spec/rubyspec/library/uri/encode_www_form_component_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI.encode_www_form_component" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/encode_www_form_spec.rb b/spec/rubyspec/library/uri/encode_www_form_spec.rb
deleted file mode 100644
index b72b928344..0000000000
--- a/spec/rubyspec/library/uri/encode_www_form_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI.encode_www_form" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/eql_spec.rb b/spec/rubyspec/library/uri/eql_spec.rb
deleted file mode 100644
index 2bbc5291e9..0000000000
--- a/spec/rubyspec/library/uri/eql_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../fixtures/normalization', __FILE__)
-require File.expand_path('../shared/eql', __FILE__)
-require 'uri'
-
-describe "URI#eql?" do
- it_behaves_like :uri_eql, :eql?
-
- it_behaves_like :uri_eql_against_other_types, :eql?
-end
diff --git a/spec/rubyspec/library/uri/equality_spec.rb b/spec/rubyspec/library/uri/equality_spec.rb
deleted file mode 100644
index 07d48a9583..0000000000
--- a/spec/rubyspec/library/uri/equality_spec.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../fixtures/normalization', __FILE__)
-require File.expand_path('../shared/eql', __FILE__)
-require 'uri'
-
-describe "URI#==" do
- it "ignores capitalization of host names" do
- URI("http://exAMPLE.cOm").should == URI("http://example.com")
- end
-
- it "ignores capitalization of scheme" do
- URI("hTTp://example.com").should == URI("http://example.com")
- end
-
- it "treats a blank path and a path of '/' as the same" do
- URI("http://example.com").should == URI("http://example.com/")
- end
-
- it "is case sensitive in all components of the URI but the host and scheme" do
- URI("http://example.com/paTH").should_not == URI("http://example.com/path")
- URI("http://[email protected]").should_not == URI("http://[email protected]")
- URI("http://example.com/path?quERy").should_not == URI("http://example.com/path?query")
- URI("http://example.com/#fragMENT").should_not == URI("http://example.com/#fragment")
- end
-
- it "differentiates based on port number" do
- URI("http://example.com:8080").should_not == URI("http://example.com")
- end
-
- # Note: The previous tests will be included in following ones
-
- it_behaves_like :uri_eql, :==
-
- it_behaves_like :uri_eql_against_other_types, :==
-
- quarantine! do # Quarantined until redmine:2542 is accepted
- it "returns true only if the normalized forms are equivalent" do
- URISpec::NORMALIZED_FORMS.each do |form|
- normal_uri = URI(form[:normalized])
- form[:equivalent].each do |same|
- URI(same).should == normal_uri
- end
- end
- end
- end
-end
diff --git a/spec/rubyspec/library/uri/escape/decode_spec.rb b/spec/rubyspec/library/uri/escape/decode_spec.rb
deleted file mode 100644
index 34d3e787c4..0000000000
--- a/spec/rubyspec/library/uri/escape/decode_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Escape#decode" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/escape/encode_spec.rb b/spec/rubyspec/library/uri/escape/encode_spec.rb
deleted file mode 100644
index edde60b3cd..0000000000
--- a/spec/rubyspec/library/uri/escape/encode_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Escape#encode" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/escape/escape_spec.rb b/spec/rubyspec/library/uri/escape/escape_spec.rb
deleted file mode 100644
index 3c6b957b18..0000000000
--- a/spec/rubyspec/library/uri/escape/escape_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Escape#escape" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/escape/unescape_spec.rb b/spec/rubyspec/library/uri/escape/unescape_spec.rb
deleted file mode 100644
index 6a7165a0d3..0000000000
--- a/spec/rubyspec/library/uri/escape/unescape_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Escape#unescape" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/extract_spec.rb b/spec/rubyspec/library/uri/extract_spec.rb
deleted file mode 100644
index 7b660851b6..0000000000
--- a/spec/rubyspec/library/uri/extract_spec.rb
+++ /dev/null
@@ -1,86 +0,0 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI.extract" do
- it "behaves according to its documentation" do
- URI.extract("text here http://foo.example.org/bla and here mailto:[email protected] and here also.").should == ["http://foo.example.org/bla", "mailto:[email protected]"]
- end
-
- it "treats contiguous URIs as a single URI" do
- URI.extract('http://example.jphttp://example.jp').should == ['http://example.jphttp://example.jp']
- end
-
- it "treats pretty much anything with a colon as a URI" do
- URI.extract('From: XXX [mailto:[email protected]]').should == ['From:', 'mailto:[email protected]]']
- end
-
- it "wraps a URI string in an array" do
- URI.extract("http://github.com/brixen/rubyspec/tree/master").should == ["http://github.com/brixen/rubyspec/tree/master"]
- end
-
- it "pulls a variety of protocol URIs from a string" do
- URI.extract("this is a string, it has http://rubini.us/ in it").should == ["http://rubini.us/"]
- URI.extract("mailto:[email protected]").should == ["mailto:[email protected]"]
- URI.extract("ftp://ruby-lang.org/").should == ["ftp://ruby-lang.org/"]
- URI.extract("https://mail.google.com").should == ["https://mail.google.com"]
- URI.extract("anything://example.com/").should == ["anything://example.com/"]
- end
-
- it "pulls all URIs within a string in order into an array when a block is not given" do
- URI.extract("1.3. Example URI
-
- The following examples illustrate URI that are in common use.
-
- ftp://ftp.is.co.za/rfc/rfc1808.txt
- -- ftp scheme for File Transfer Protocol services
-
- gopher://spinaltap.micro.umn.edu/00/Weather/California/Los%20Angeles
- -- gopher scheme for Gopher and Gopher+ Protocol services
-
- http://www.math.uio.no/faq/compression-faq/part1.html
- -- http scheme for Hypertext Transfer Protocol services
-
- -- mailto scheme for electronic mail addresses
-
- news:comp.infosystems.www.servers.unix
- -- news scheme for USENET news groups and articles
-
- telnet://melvyl.ucop.edu/
- -- telnet scheme for interactive services via the TELNET Protocol
- ").should == ["ftp://ftp.is.co.za/rfc/rfc1808.txt","gopher://spinaltap.micro.umn.edu/00/Weather/California/Los%20Angeles","http://www.math.uio.no/faq/compression-faq/part1.html","mailto:[email protected]","news:comp.infosystems.www.servers.unix","telnet://melvyl.ucop.edu/"]
- end
-
- it "yields each URI in the given string in order to a block, if given, and returns nil" do
- results = ["http://foo.example.org/bla", "mailto:[email protected]"]
- URI.extract("text here http://foo.example.org/bla and here mailto:[email protected] and here also.") {|uri|
- uri.should == results.shift
- }.should == nil
- results.should == []
- end
-
- it "allows the user to specify a list of acceptable protocols of URIs to scan for" do
- URI.extract("1.3. Example URI
-
- The following examples illustrate URI that are in common use.
-
- ftp://ftp.is.co.za/rfc/rfc1808.txt
- -- ftp scheme for File Transfer Protocol services
-
- gopher://spinaltap.micro.umn.edu/00/Weather/California/Los%20Angeles
- -- gopher scheme for Gopher and Gopher+ Protocol services
-
- http://www.math.uio.no/faq/compression-faq/part1.html
- -- http scheme for Hypertext Transfer Protocol services
-
- -- mailto scheme for electronic mail addresses
-
- news:comp.infosystems.www.servers.unix
- -- news scheme for USENET news groups and articles
-
- telnet://melvyl.ucop.edu/
- -- telnet scheme for interactive services via the TELNET Protocol
- ", ["http","ftp","mailto"]).should == ["ftp://ftp.is.co.za/rfc/rfc1808.txt","http://www.math.uio.no/faq/compression-faq/part1.html","mailto:[email protected]"]
- end
-end
diff --git a/spec/rubyspec/library/uri/fixtures/classes.rb b/spec/rubyspec/library/uri/fixtures/classes.rb
deleted file mode 100644
index e1179307cc..0000000000
--- a/spec/rubyspec/library/uri/fixtures/classes.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-require 'uri'
-
-module URISpec
- def self.components(uri)
- result = {}
- uri.component.each do |component|
- result[component] = uri.send(component)
- end
- result
- end
-end
diff --git a/spec/rubyspec/library/uri/fixtures/normalization.rb b/spec/rubyspec/library/uri/fixtures/normalization.rb
deleted file mode 100644
index cbc26c9b48..0000000000
--- a/spec/rubyspec/library/uri/fixtures/normalization.rb
+++ /dev/null
@@ -1,54 +0,0 @@
-module URISpec
- # Not an exhaustive list. Refer to rfc3986
- NORMALIZED_FORMS = [
- { normalized: "http://example.com/",
- equivalent: %w{ hTTp://example.com/
- http://exaMple.com/
- http://exa%4dple.com/
- http://exa%4Dple.com/
- http://exa%6dple.com/
- http://exa%6Dple.com/
- http://@example.com/
- http://example.com:/
- http://example.com:80/
- http://example.com
- },
- different: %w{ http://example.com/#
- http://example.com/?
- http://example.com:8888/
- http:///example.com
- http:example.com
- https://example.com/
- },
- },
- { normalized: "http://example.com/index.html",
- equivalent: %w{ http://example.com/index.ht%6dl
- http://example.com/index.ht%6Dl
- },
- different: %w{ http://example.com/index.hTMl
- http://example.com/index.ht%4dl
- http://example.com/index
- http://example.com/
- http://example.com/
- },
- },
- { normalized: "http://example.com/x?y#z",
- equivalent: %w{ http://example.com/x?y#%7a
- http://example.com/x?y#%7A
- http://example.com/x?%79#z
- },
- different: %w{ http://example.com/x?Y#z
- http://example.com/x?y#Z
- http://example.com/x?y=#z
- http://example.com/x?y
- http://example.com/x#z
- },
- },
- { normalized: "http://example.com/x?q=a%20b",
- equivalent: %w{
- },
- different: %w{ http://example.com/x?q=a+b
- },
- },
- ]
-end
diff --git a/spec/rubyspec/library/uri/ftp/build_spec.rb b/spec/rubyspec/library/uri/ftp/build_spec.rb
deleted file mode 100644
index c7765e2868..0000000000
--- a/spec/rubyspec/library/uri/ftp/build_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::FTP.build" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/ftp/merge_spec.rb b/spec/rubyspec/library/uri/ftp/merge_spec.rb
deleted file mode 100644
index b766e992ca..0000000000
--- a/spec/rubyspec/library/uri/ftp/merge_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::FTP#merge" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/ftp/new2_spec.rb b/spec/rubyspec/library/uri/ftp/new2_spec.rb
deleted file mode 100644
index a43916af6a..0000000000
--- a/spec/rubyspec/library/uri/ftp/new2_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::FTP.new2" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/ftp/path_spec.rb b/spec/rubyspec/library/uri/ftp/path_spec.rb
deleted file mode 100644
index 9e1a00602f..0000000000
--- a/spec/rubyspec/library/uri/ftp/path_spec.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::FTP#path=" do
- before :each do
- @url = URI.parse('ftp://example.com')
- end
-
- it "does not require a leading /" do
- @url.path = 'foo'
- @url.path.should == 'foo'
- end
-
- it "does not strip the leading /" do
- @url.path = '/foo'
- @url.path.should == '/foo'
- end
-end
-
-describe "URI::FTP#path" do
- it "unescapes the leading /" do
- url = URI.parse('ftp://example.com/%2Ffoo')
-
- url.path.should == '/foo'
- end
-end
diff --git a/spec/rubyspec/library/uri/ftp/set_typecode_spec.rb b/spec/rubyspec/library/uri/ftp/set_typecode_spec.rb
deleted file mode 100644
index b815bc8740..0000000000
--- a/spec/rubyspec/library/uri/ftp/set_typecode_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::FTP#set_typecode" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/ftp/to_s_spec.rb b/spec/rubyspec/library/uri/ftp/to_s_spec.rb
deleted file mode 100644
index e4e2832e86..0000000000
--- a/spec/rubyspec/library/uri/ftp/to_s_spec.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-
-describe "URI::FTP#to_s" do
- before :each do
- @url = URI.parse('ftp://example.com')
- end
-
- it "escapes the leading /" do
- @url.path = '/foo'
-
- @url.to_s.should == 'ftp://example.com/%2Ffoo'
- end
-end
diff --git a/spec/rubyspec/library/uri/ftp/typecode_spec.rb b/spec/rubyspec/library/uri/ftp/typecode_spec.rb
deleted file mode 100644
index b298c2ae98..0000000000
--- a/spec/rubyspec/library/uri/ftp/typecode_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::FTP#typecode" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "URI::FTP#typecode=" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/absolute_spec.rb b/spec/rubyspec/library/uri/generic/absolute_spec.rb
deleted file mode 100644
index 4f6526b827..0000000000
--- a/spec/rubyspec/library/uri/generic/absolute_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#absolute" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "URI::Generic#absolute?" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/build2_spec.rb b/spec/rubyspec/library/uri/generic/build2_spec.rb
deleted file mode 100644
index 0b9a6788f6..0000000000
--- a/spec/rubyspec/library/uri/generic/build2_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic.build2" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/build_spec.rb b/spec/rubyspec/library/uri/generic/build_spec.rb
deleted file mode 100644
index 6fa5d6ac55..0000000000
--- a/spec/rubyspec/library/uri/generic/build_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic.build" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/coerce_spec.rb b/spec/rubyspec/library/uri/generic/coerce_spec.rb
deleted file mode 100644
index 1b1a040f63..0000000000
--- a/spec/rubyspec/library/uri/generic/coerce_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#coerce" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/component_ary_spec.rb b/spec/rubyspec/library/uri/generic/component_ary_spec.rb
deleted file mode 100644
index 3244073e0e..0000000000
--- a/spec/rubyspec/library/uri/generic/component_ary_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#component_ary" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/component_spec.rb b/spec/rubyspec/library/uri/generic/component_spec.rb
deleted file mode 100644
index 6fb83d7796..0000000000
--- a/spec/rubyspec/library/uri/generic/component_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#component" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "URI::Generic.component" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/default_port_spec.rb b/spec/rubyspec/library/uri/generic/default_port_spec.rb
deleted file mode 100644
index d1e0ce2d3f..0000000000
--- a/spec/rubyspec/library/uri/generic/default_port_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#default_port" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "URI::Generic.default_port" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/eql_spec.rb b/spec/rubyspec/library/uri/generic/eql_spec.rb
deleted file mode 100644
index 65f9204a19..0000000000
--- a/spec/rubyspec/library/uri/generic/eql_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#eql?" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/equal_value_spec.rb b/spec/rubyspec/library/uri/generic/equal_value_spec.rb
deleted file mode 100644
index f41b202498..0000000000
--- a/spec/rubyspec/library/uri/generic/equal_value_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#==" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/fragment_spec.rb b/spec/rubyspec/library/uri/generic/fragment_spec.rb
deleted file mode 100644
index de6f4e078d..0000000000
--- a/spec/rubyspec/library/uri/generic/fragment_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#fragment" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "URI::Generic#fragment=" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/hash_spec.rb b/spec/rubyspec/library/uri/generic/hash_spec.rb
deleted file mode 100644
index 3410558067..0000000000
--- a/spec/rubyspec/library/uri/generic/hash_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#hash" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/hierarchical_spec.rb b/spec/rubyspec/library/uri/generic/hierarchical_spec.rb
deleted file mode 100644
index 1c90dc4f8f..0000000000
--- a/spec/rubyspec/library/uri/generic/hierarchical_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#hierarchical?" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/host_spec.rb b/spec/rubyspec/library/uri/generic/host_spec.rb
deleted file mode 100644
index 6fb6c1c36a..0000000000
--- a/spec/rubyspec/library/uri/generic/host_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#host" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "URI::Generic#host=" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/inspect_spec.rb b/spec/rubyspec/library/uri/generic/inspect_spec.rb
deleted file mode 100644
index 696c3308d4..0000000000
--- a/spec/rubyspec/library/uri/generic/inspect_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#inspect" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/merge_spec.rb b/spec/rubyspec/library/uri/generic/merge_spec.rb
deleted file mode 100644
index 63642197e1..0000000000
--- a/spec/rubyspec/library/uri/generic/merge_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#merge" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "URI::Generic#merge!" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/minus_spec.rb b/spec/rubyspec/library/uri/generic/minus_spec.rb
deleted file mode 100644
index 3426a6068b..0000000000
--- a/spec/rubyspec/library/uri/generic/minus_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#-" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/normalize_spec.rb b/spec/rubyspec/library/uri/generic/normalize_spec.rb
deleted file mode 100644
index ac02b644d0..0000000000
--- a/spec/rubyspec/library/uri/generic/normalize_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#normalize" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "URI::Generic#normalize!" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/opaque_spec.rb b/spec/rubyspec/library/uri/generic/opaque_spec.rb
deleted file mode 100644
index f418c220f2..0000000000
--- a/spec/rubyspec/library/uri/generic/opaque_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#opaque" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "URI::Generic#opaque=" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/password_spec.rb b/spec/rubyspec/library/uri/generic/password_spec.rb
deleted file mode 100644
index 087db60fb9..0000000000
--- a/spec/rubyspec/library/uri/generic/password_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#password" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "URI::Generic#password=" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/path_spec.rb b/spec/rubyspec/library/uri/generic/path_spec.rb
deleted file mode 100644
index 5ea60b5418..0000000000
--- a/spec/rubyspec/library/uri/generic/path_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#path" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "URI::Generic#path=" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/plus_spec.rb b/spec/rubyspec/library/uri/generic/plus_spec.rb
deleted file mode 100644
index 3d1c031022..0000000000
--- a/spec/rubyspec/library/uri/generic/plus_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#+" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/port_spec.rb b/spec/rubyspec/library/uri/generic/port_spec.rb
deleted file mode 100644
index 148e84ff14..0000000000
--- a/spec/rubyspec/library/uri/generic/port_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#port" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "URI::Generic#port=" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/query_spec.rb b/spec/rubyspec/library/uri/generic/query_spec.rb
deleted file mode 100644
index 945fdc06a3..0000000000
--- a/spec/rubyspec/library/uri/generic/query_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#query" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "URI::Generic#query=" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/registry_spec.rb b/spec/rubyspec/library/uri/generic/registry_spec.rb
deleted file mode 100644
index 6a48b25465..0000000000
--- a/spec/rubyspec/library/uri/generic/registry_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#registry" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "URI::Generic#registry=" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/relative_spec.rb b/spec/rubyspec/library/uri/generic/relative_spec.rb
deleted file mode 100644
index 09730fa4eb..0000000000
--- a/spec/rubyspec/library/uri/generic/relative_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#relative?" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/route_from_spec.rb b/spec/rubyspec/library/uri/generic/route_from_spec.rb
deleted file mode 100644
index 03321cbf0d..0000000000
--- a/spec/rubyspec/library/uri/generic/route_from_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#route_from" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/route_to_spec.rb b/spec/rubyspec/library/uri/generic/route_to_spec.rb
deleted file mode 100644
index a12e1f7649..0000000000
--- a/spec/rubyspec/library/uri/generic/route_to_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#route_to" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/scheme_spec.rb b/spec/rubyspec/library/uri/generic/scheme_spec.rb
deleted file mode 100644
index fa3dfcb8aa..0000000000
--- a/spec/rubyspec/library/uri/generic/scheme_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#scheme" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "URI::Generic#scheme=" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/select_spec.rb b/spec/rubyspec/library/uri/generic/select_spec.rb
deleted file mode 100644
index 5cc104f5dd..0000000000
--- a/spec/rubyspec/library/uri/generic/select_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#select" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/set_fragment_spec.rb b/spec/rubyspec/library/uri/generic/set_fragment_spec.rb
deleted file mode 100644
index cebad46585..0000000000
--- a/spec/rubyspec/library/uri/generic/set_fragment_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#set_fragment" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/set_host_spec.rb b/spec/rubyspec/library/uri/generic/set_host_spec.rb
deleted file mode 100644
index 357b7a6889..0000000000
--- a/spec/rubyspec/library/uri/generic/set_host_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#set_host" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/set_opaque_spec.rb b/spec/rubyspec/library/uri/generic/set_opaque_spec.rb
deleted file mode 100644
index afd6597675..0000000000
--- a/spec/rubyspec/library/uri/generic/set_opaque_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#set_opaque" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/set_password_spec.rb b/spec/rubyspec/library/uri/generic/set_password_spec.rb
deleted file mode 100644
index 15b4fdc37d..0000000000
--- a/spec/rubyspec/library/uri/generic/set_password_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#set_password" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/set_path_spec.rb b/spec/rubyspec/library/uri/generic/set_path_spec.rb
deleted file mode 100644
index b4366d789c..0000000000
--- a/spec/rubyspec/library/uri/generic/set_path_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#set_path" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/set_port_spec.rb b/spec/rubyspec/library/uri/generic/set_port_spec.rb
deleted file mode 100644
index aa65bb96e3..0000000000
--- a/spec/rubyspec/library/uri/generic/set_port_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#set_port" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/set_query_spec.rb b/spec/rubyspec/library/uri/generic/set_query_spec.rb
deleted file mode 100644
index b1c25e56ca..0000000000
--- a/spec/rubyspec/library/uri/generic/set_query_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#set_query" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/set_registry_spec.rb b/spec/rubyspec/library/uri/generic/set_registry_spec.rb
deleted file mode 100644
index 602f868ac1..0000000000
--- a/spec/rubyspec/library/uri/generic/set_registry_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#set_registry" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/set_scheme_spec.rb b/spec/rubyspec/library/uri/generic/set_scheme_spec.rb
deleted file mode 100644
index e1a94c5b1a..0000000000
--- a/spec/rubyspec/library/uri/generic/set_scheme_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#set_scheme" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/set_user_spec.rb b/spec/rubyspec/library/uri/generic/set_user_spec.rb
deleted file mode 100644
index 36a6ac9e85..0000000000
--- a/spec/rubyspec/library/uri/generic/set_user_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#set_user" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/set_userinfo_spec.rb b/spec/rubyspec/library/uri/generic/set_userinfo_spec.rb
deleted file mode 100644
index cbe80d9809..0000000000
--- a/spec/rubyspec/library/uri/generic/set_userinfo_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#set_userinfo" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/to_s_spec.rb b/spec/rubyspec/library/uri/generic/to_s_spec.rb
deleted file mode 100644
index c0a0f803ef..0000000000
--- a/spec/rubyspec/library/uri/generic/to_s_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#to_s" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/use_registry_spec.rb b/spec/rubyspec/library/uri/generic/use_registry_spec.rb
deleted file mode 100644
index 4e7ae6a5cf..0000000000
--- a/spec/rubyspec/library/uri/generic/use_registry_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic.use_registry" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/user_spec.rb b/spec/rubyspec/library/uri/generic/user_spec.rb
deleted file mode 100644
index b785ef6879..0000000000
--- a/spec/rubyspec/library/uri/generic/user_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#user" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "URI::Generic#user=" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/generic/userinfo_spec.rb b/spec/rubyspec/library/uri/generic/userinfo_spec.rb
deleted file mode 100644
index 5d0fc50b65..0000000000
--- a/spec/rubyspec/library/uri/generic/userinfo_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Generic#userinfo" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "URI::Generic#userinfo=" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/http/build_spec.rb b/spec/rubyspec/library/uri/http/build_spec.rb
deleted file mode 100644
index 85103167e0..0000000000
--- a/spec/rubyspec/library/uri/http/build_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::HTTP.build" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/http/request_uri_spec.rb b/spec/rubyspec/library/uri/http/request_uri_spec.rb
deleted file mode 100644
index 85d89aba77..0000000000
--- a/spec/rubyspec/library/uri/http/request_uri_spec.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::HTTP.request_uri" do
- it "returns a string of the path + query" do
- URI("http://reddit.com/r/ruby/").request_uri.should == "/r/ruby/"
- URI("http://reddit.com/r/ruby/search?q=rubinius").request_uri.should == "/r/ruby/search?q=rubinius"
- end
-
- it "returns '/' if the path of the URI is blank" do
- URI("http://ruby.reddit.com").request_uri.should == "/"
- end
-end
-describe "URI::HTTP#request_uri" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/join_spec.rb b/spec/rubyspec/library/uri/join_spec.rb
deleted file mode 100644
index 681ba45cc7..0000000000
--- a/spec/rubyspec/library/uri/join_spec.rb
+++ /dev/null
@@ -1,57 +0,0 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI.join" do
- it "returns a URI object of the concatenation of a protocol and domain, and a path" do
- URI.join("http://localhost/","main.rbx").should == URI.parse("http://localhost/main.rbx")
- end
-
- it "accepts URI objects" do
- URI.join(URI("http://localhost/"),"main.rbx").should == URI.parse("http://localhost/main.rbx")
- URI.join("http://localhost/",URI("main.rbx")).should == URI.parse("http://localhost/main.rbx")
- URI.join(URI("http://localhost/"),URI("main.rbx")).should == URI.parse("http://localhost/main.rbx")
- end
-
- it "accepts string-like arguments with to_str" do
- str = mock('string-like')
- str.should_receive(:to_str).and_return("http://ruby-lang.org")
- str2 = mock('string-like also')
- str2.should_receive(:to_str).and_return("foo/bar")
- URI.join(str, str2).should == URI.parse("http://ruby-lang.org/foo/bar")
- end
-
- it "raises an error if given no argument" do
- lambda{ URI.join }.should raise_error
- end
-
- it "doesn't create redundant '/'s" do
- URI.join("http://localhost/", "/main.rbx").should == URI.parse("http://localhost/main.rbx")
- end
-
- it "discards arguments given before an absolute uri" do
- URI.join("http://localhost/a/b/c/d", "http://ruby-lang.com/foo", "bar").should == URI.parse("http://ruby-lang.com/bar")
- end
-
- it "resolves .. in paths" do
- URI.join("http://localhost/a/b/c/d", "../../e/f", "g/h/../i").to_s.should == "http://localhost/a/e/g/i"
- end
-end
-
-
-# assert_equal(URI.parse('http://foo/bar'), URI.join('http://foo/bar'))
-# assert_equal(URI.parse('http://foo/bar'), URI.join('http://foo', 'bar'))
-# assert_equal(URI.parse('http://foo/bar/'), URI.join('http://foo', 'bar/'))
-#
-# assert_equal(URI.parse('http://foo/baz'), URI.join('http://foo', 'bar', 'baz'))
-# assert_equal(URI.parse('http://foo/baz'), URI.join('http://foo', 'bar', '/baz'))
-# assert_equal(URI.parse('http://foo/baz/'), URI.join('http://foo', 'bar', '/baz/'))
-# assert_equal(URI.parse('http://foo/bar/baz'), URI.join('http://foo', 'bar/', 'baz'))
-# assert_equal(URI.parse('http://foo/hoge'), URI.join('http://foo', 'bar', 'baz', 'hoge'))
-#
-# assert_equal(URI.parse('http://foo/bar/baz'), URI.join('http://foo', 'bar/baz'))
-# assert_equal(URI.parse('http://foo/bar/hoge'), URI.join('http://foo', 'bar/baz', 'hoge'))
-# assert_equal(URI.parse('http://foo/bar/baz/hoge'), URI.join('http://foo', 'bar/baz/', 'hoge'))
-# assert_equal(URI.parse('http://foo/hoge'), URI.join('http://foo', 'bar/baz', '/hoge'))
-# assert_equal(URI.parse('http://foo/bar/hoge'), URI.join('http://foo', 'bar/baz', 'hoge'))
-# assert_equal(URI.parse('http://foo/bar/baz/hoge'), URI.join('http://foo', 'bar/baz/', 'hoge'))
-# assert_equal(URI.parse('http://foo/hoge'), URI.join('http://foo', 'bar/baz', '/hoge'))
diff --git a/spec/rubyspec/library/uri/ldap/attributes_spec.rb b/spec/rubyspec/library/uri/ldap/attributes_spec.rb
deleted file mode 100644
index 2309de7c62..0000000000
--- a/spec/rubyspec/library/uri/ldap/attributes_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::LDAP#attributes" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "URI::LDAP#attributes=" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/ldap/build_spec.rb b/spec/rubyspec/library/uri/ldap/build_spec.rb
deleted file mode 100644
index 99e2611b1f..0000000000
--- a/spec/rubyspec/library/uri/ldap/build_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::LDAP.build" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/ldap/dn_spec.rb b/spec/rubyspec/library/uri/ldap/dn_spec.rb
deleted file mode 100644
index b1371611d3..0000000000
--- a/spec/rubyspec/library/uri/ldap/dn_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::LDAP#dn" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "URI::LDAP#dn=" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/ldap/extensions_spec.rb b/spec/rubyspec/library/uri/ldap/extensions_spec.rb
deleted file mode 100644
index 2d9b09e6a7..0000000000
--- a/spec/rubyspec/library/uri/ldap/extensions_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::LDAP#extensions" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "URI::LDAP#extensions=" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/ldap/filter_spec.rb b/spec/rubyspec/library/uri/ldap/filter_spec.rb
deleted file mode 100644
index 1f996339db..0000000000
--- a/spec/rubyspec/library/uri/ldap/filter_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::LDAP#filter" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "URI::LDAP#filter=" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/ldap/hierarchical_spec.rb b/spec/rubyspec/library/uri/ldap/hierarchical_spec.rb
deleted file mode 100644
index 97c23a7f0c..0000000000
--- a/spec/rubyspec/library/uri/ldap/hierarchical_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::LDAP#hierarchical?" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/ldap/scope_spec.rb b/spec/rubyspec/library/uri/ldap/scope_spec.rb
deleted file mode 100644
index d4a02e08f0..0000000000
--- a/spec/rubyspec/library/uri/ldap/scope_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::LDAP#scope" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "URI::LDAP#scope=" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/ldap/set_attributes_spec.rb b/spec/rubyspec/library/uri/ldap/set_attributes_spec.rb
deleted file mode 100644
index 1bbcb34837..0000000000
--- a/spec/rubyspec/library/uri/ldap/set_attributes_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::LDAP#set_attributes" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/ldap/set_dn_spec.rb b/spec/rubyspec/library/uri/ldap/set_dn_spec.rb
deleted file mode 100644
index abb640b585..0000000000
--- a/spec/rubyspec/library/uri/ldap/set_dn_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::LDAP#set_dn" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/ldap/set_extensions_spec.rb b/spec/rubyspec/library/uri/ldap/set_extensions_spec.rb
deleted file mode 100644
index 5cd2077aab..0000000000
--- a/spec/rubyspec/library/uri/ldap/set_extensions_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::LDAP#set_extensions" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/ldap/set_filter_spec.rb b/spec/rubyspec/library/uri/ldap/set_filter_spec.rb
deleted file mode 100644
index f1b8e5e595..0000000000
--- a/spec/rubyspec/library/uri/ldap/set_filter_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::LDAP#set_filter" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/ldap/set_scope_spec.rb b/spec/rubyspec/library/uri/ldap/set_scope_spec.rb
deleted file mode 100644
index 5a0841cfd8..0000000000
--- a/spec/rubyspec/library/uri/ldap/set_scope_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::LDAP#set_scope" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/mailto/build_spec.rb b/spec/rubyspec/library/uri/mailto/build_spec.rb
deleted file mode 100644
index cb57f0c794..0000000000
--- a/spec/rubyspec/library/uri/mailto/build_spec.rb
+++ /dev/null
@@ -1,98 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Mailto.build" do
- it "conforms to the MatzRuby tests" do
- ok = []
- bad = []
-
- # RFC2368, 6. Examples
- ok << ["mailto:[email protected]"]
- ok[-1] << ["[email protected]", nil]
- ok[-1] << {to: "[email protected]"}
-
- # mailto:[email protected]?subject=current-issue
- ok << ["mailto:[email protected]?subject=current-issue"]
- ok[-1] << ["[email protected]", ["subject=current-issue"]]
- ok[-1] << {to: "[email protected]",
- headers: ["subject=current-issue"]}
-
- # mailto:[email protected]?body=send%20current-issue
- ok << ["mailto:[email protected]?body=send%20current-issue"]
- ok[-1] << ["[email protected]", ["body=send%20current-issue"]]
- ok[-1] << {to: "[email protected]",
- headers: ["body=send%20current-issue"]}
-
- # mailto:[email protected]?body=send%20current-issue%0D%0Asend%20index
- ok << ["mailto:[email protected]?body=send%20current-issue%0D%0Asend%20index"]
- ok[-1] << ["[email protected]",
- ["body=send%20current-issue%0D%0Asend%20index"]]
- ok[-1] << {to: "[email protected]",
- headers: ["body=send%20current-issue%0D%0Asend%20index"]}
-
- # mailto:[email protected]?In-Reply-To=%[email protected]
- ok << ["mailto:[email protected]?In-Reply-To=%[email protected]"]
- ok[-1] << ["[email protected]",
- ["In-Reply-To=%[email protected]"]]
- ok[-1] << {to: "[email protected]",
- headers: ["In-Reply-To=%[email protected]"]}
-
- # mailto:[email protected]?body=subscribe%20bamboo-l
- ok << ["mailto:[email protected]?body=subscribe%20bamboo-l"]
- ok[-1] << ["[email protected]", ["body=subscribe%20bamboo-l"]]
- ok[-1] << {to: "[email protected]",
- headers: ["body=subscribe%20bamboo-l"]}
-
- ok << ["mailto:[email protected][email protected]&body=hello"]
- ok[-1] << ["[email protected]", ["[email protected]", "body=hello"]]
- ok[-1] << {to: "[email protected]",
- headers: ["[email protected]", "body=hello"]}
-
- ok << ["mailto:[email protected]&[email protected]&body=hello"]
- ok[-1] << [nil,
- ["[email protected]", "[email protected]", "body=hello"]]
- ok[-1] << {headers: ["[email protected]", "[email protected]", "body=hello"]}
-
- # mailto:gorby%[email protected]
- ok << ["mailto:gorby%[email protected]"]
- ok[-1] << ["gorby%[email protected]", nil]
- ok[-1] << {to: "gorby%[email protected]"}
-
- # mailto:unlikely%[email protected]?blat=foop
- ok << ["mailto:unlikely%[email protected]?blat=foop"]
- ok[-1] << ["unlikely%[email protected]", ["blat=foop"]]
- ok[-1] << {to: "unlikely%[email protected]",
- headers: ["blat=foop"]}
-
- ok_all = ok.flatten.join("\0")
-
- # mailto:[email protected][email protected]?body=hello ; WRONG!
- bad << ["[email protected]", ["[email protected]?body=hello"]]
-
- # mailto:javascript:alert()
- bad << ["javascript:alert()", []]
-
- # '=' which is in hname or hvalue is wrong.
- bad << ["[email protected]?subject=1+1=2", []]
-
- ok.each do |x|
- URI::MailTo.build(x[1]).to_s.should == x[0]
- URI::MailTo.build(x[2]).to_s.should == x[0]
- end
-
- bad.each do |x|
- lambda { URI::MailTo.build(x) }.should raise_error(URI::InvalidComponentError)
- end
-
- ok.flatten.join("\0").should == ok_all
- end
-end
-
-
-
-describe "URI::MailTo.build" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/mailto/headers_spec.rb b/spec/rubyspec/library/uri/mailto/headers_spec.rb
deleted file mode 100644
index 844fdee714..0000000000
--- a/spec/rubyspec/library/uri/mailto/headers_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::MailTo#headers" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "URI::MailTo#headers=" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/mailto/set_headers_spec.rb b/spec/rubyspec/library/uri/mailto/set_headers_spec.rb
deleted file mode 100644
index c1384d5dca..0000000000
--- a/spec/rubyspec/library/uri/mailto/set_headers_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::MailTo#set_headers" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/mailto/set_to_spec.rb b/spec/rubyspec/library/uri/mailto/set_to_spec.rb
deleted file mode 100644
index a8351a2092..0000000000
--- a/spec/rubyspec/library/uri/mailto/set_to_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::MailTo#set_to" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/mailto/to_mailtext_spec.rb b/spec/rubyspec/library/uri/mailto/to_mailtext_spec.rb
deleted file mode 100644
index 4c7a48874f..0000000000
--- a/spec/rubyspec/library/uri/mailto/to_mailtext_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::MailTo#to_mailtext" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/mailto/to_rfc822text_spec.rb b/spec/rubyspec/library/uri/mailto/to_rfc822text_spec.rb
deleted file mode 100644
index e769f62deb..0000000000
--- a/spec/rubyspec/library/uri/mailto/to_rfc822text_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::MailTo#to_rfc822text" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/mailto/to_s_spec.rb b/spec/rubyspec/library/uri/mailto/to_s_spec.rb
deleted file mode 100644
index 2709d19d27..0000000000
--- a/spec/rubyspec/library/uri/mailto/to_s_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::MailTo#to_s" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/mailto/to_spec.rb b/spec/rubyspec/library/uri/mailto/to_spec.rb
deleted file mode 100644
index f30d23dd53..0000000000
--- a/spec/rubyspec/library/uri/mailto/to_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::MailTo#to" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "URI::MailTo#to=" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/merge_spec.rb b/spec/rubyspec/library/uri/merge_spec.rb
deleted file mode 100644
index c62e80d6b2..0000000000
--- a/spec/rubyspec/library/uri/merge_spec.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI#merge" do
- it "returns the receiver and the argument, joined as per URI.join" do
- URI("http://localhost/").merge("main.rbx").should == URI.parse("http://localhost/main.rbx")
- URI("http://localhost/a/b/c/d").merge("http://ruby-lang.com/foo").should == URI.parse("http://ruby-lang.com/foo")
- URI("http://localhost/a/b/c/d").merge("../../e/f").to_s.should == "http://localhost/a/e/f"
- end
-
- it "accepts URI objects as argument" do
- URI("http://localhost/").merge(URI("main.rbx")).should == URI.parse("http://localhost/main.rbx")
- end
-
- it "accepts a string-like argument" do
- str = mock('string-like')
- str.should_receive(:to_str).and_return("foo/bar")
- URI("http://localhost/").merge(str).should == URI.parse("http://localhost/foo/bar")
- end
-end
diff --git a/spec/rubyspec/library/uri/normalize_spec.rb b/spec/rubyspec/library/uri/normalize_spec.rb
deleted file mode 100644
index 079a9ad61d..0000000000
--- a/spec/rubyspec/library/uri/normalize_spec.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../fixtures/normalization', __FILE__)
-require 'uri'
-
-describe "URI#normalize" do
- it "adds a / onto the end of the URI if the path is blank" do
- no_path = URI("http://example.com")
- no_path.to_s.should_not == "http://example.com/"
- no_path.normalize.to_s.should == "http://example.com/"
- end
-
- it "downcases the host of the URI" do
- uri = URI("http://exAMPLE.cOm/")
- uri.to_s.should_not == "http://example.com/"
- uri.normalize.to_s.should == "http://example.com/"
- end
-
- # The previous tests are included by the one below
-
- quarantine! do # Quarantined until redmine:2542 is accepted
- it "respects RFC 3986" do
- URISpec::NORMALIZED_FORMS.each do |form|
- normal_uri = URI(form[:normalized])
- normalized = normal_uri.normalize.to_s
- normal_uri.to_s.should == normalized
- form[:equivalent].each do |same|
- URI(same).normalize.to_s.should == normalized
- end
- form[:different].each do |other|
- URI(other).normalize.to_s.should_not == normalized
- end
- end
- end
- end
-end
diff --git a/spec/rubyspec/library/uri/parse_spec.rb b/spec/rubyspec/library/uri/parse_spec.rb
deleted file mode 100644
index 4aa84ae2ee..0000000000
--- a/spec/rubyspec/library/uri/parse_spec.rb
+++ /dev/null
@@ -1,203 +0,0 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-
-describe "URI.parse" do
-
- it "returns a URI::HTTP object when parsing an HTTP URI" do
- URI.parse("http://www.example.com/").should be_kind_of(URI::HTTP)
- end
-
- it "populates the components of a parsed URI::HTTP, setting the port to 80 by default" do
- # general case
- URISpec.components(URI.parse("http://user:[email protected]/path/?query=val&q2=val2#fragment")).should == {
- scheme: "http",
- userinfo: "user:pass",
- host: "example.com",
- port: 80,
- path: "/path/",
- query: "query=val&q2=val2",
- fragment: "fragment"
- }
-
- # multiple paths
- URISpec.components(URI.parse("http://a/b/c/d;p?q")).should == {
- scheme: "http",
- userinfo: nil,
- host: "a",
- port: 80,
- path: "/b/c/d;p",
- query: "q",
- fragment: nil
- }
-
- # multi-level domain
- URISpec.components(URI.parse('http://www.math.uio.no/faq/compression-faq/part1.html')).should == {
- scheme: "http",
- userinfo: nil,
- host: "www.math.uio.no",
- port: 80,
- path: "/faq/compression-faq/part1.html",
- query: nil,
- fragment: nil
- }
- end
-
- it "parses out the port number of a URI, when given" do
- URI.parse("http://example.com:8080/").port.should == 8080
- end
-
- it "returns a URI::HTTPS object when parsing an HTTPS URI" do
- URI.parse("https://important-intern-net.net").should be_kind_of(URI::HTTPS)
- end
-
- it "sets the port of a parsed https URI to 443 by default" do
- URI.parse("https://example.com/").port.should == 443
- end
-
- it "populates the components of a parsed URI::FTP object" do
- # generic, empty password.
- url = URI.parse("ftp://[email protected]/pub/ruby/1.8/ruby-1.8.6.tar.bz2;type=i")
- url.should be_kind_of(URI::FTP)
- URISpec.components(url).should == {
- scheme: "ftp",
- userinfo: "anonymous",
- host: "ruby-lang.org",
- port: 21,
- path: "pub/ruby/1.8/ruby-1.8.6.tar.bz2",
- typecode: "i"
- }
-
- # multidomain, no user or password
- url = URI.parse('ftp://ftp.is.co.za/rfc/rfc1808.txt')
- url.should be_kind_of(URI::FTP)
- URISpec.components(url).should == {
- scheme: "ftp",
- userinfo: nil,
- host: "ftp.is.co.za",
- port: 21,
- path: "rfc/rfc1808.txt",
- typecode: nil
- }
-
- # empty user
- url = URI.parse('ftp://:pass@localhost/')
- url.should be_kind_of(URI::FTP)
- URISpec.components(url).should == {
- scheme: "ftp",
- userinfo: ":pass",
- host: "localhost",
- port: 21,
- path: "",
- typecode: nil
- }
- url.password.should == "pass"
- end
-
- it "returns a URI::LDAP object when parsing an LDAP URI" do
- #taken from http://www.faqs.org/rfcs/rfc2255.html 'cause I don't really know what an LDAP url looks like
- ldap_uris = %w{ ldap:///o=University%20of%20Michigan,c=US ldap://ldap.itd.umich.edu/o=University%20of%20Michigan,c=US ldap://ldap.itd.umich.edu/o=University%20of%20Michigan,c=US?postalAddress ldap://host.com:6666/o=University%20of%20Michigan,c=US??sub?(cn=Babs%20Jensen) ldap://ldap.itd.umich.edu/c=GB?objectClass?one ldap://ldap.question.com/o=Question%3f,c=US?mail ldap://ldap.netscape.com/o=Babsco,c=US??(int=%5c00%5c00%5c00%5c04) ldap:///??sub??bindname=cn=Manager%2co=Foo ldap:///??sub??!bindname=cn=Manager%2co=Foo }
- ldap_uris.each do |ldap_uri|
- URI.parse(ldap_uri).should be_kind_of(URI::LDAP)
- end
- end
-
- it "populates the components of a parsed URI::LDAP object" do
- URISpec.components(URI.parse("ldap://ldap.itd.umich.edu/o=University%20of%20Michigan,c=US?postalAddress?scope?filter?extensions")).should == {
- scheme: "ldap",
- host: "ldap.itd.umich.edu",
- port: 389,
- dn: "o=University%20of%20Michigan,c=US",
- attributes: "postalAddress",
- scope: "scope",
- filter: "filter",
- extensions: "extensions"
- }
- end
-
- it "returns a URI::MailTo object when passed a mailto URI" do
- URI.parse("mailto:[email protected]").should be_kind_of(URI::MailTo)
- end
-
- it "populates the components of a parsed URI::MailTo object" do
- URISpec.components(URI.parse("mailto:[email protected]?subject=Discounts%20On%20Imported%20methods!!!&body=Exciting%20offer")).should == {
- scheme: "mailto",
- headers: [["subject","Discounts%20On%20Imported%20methods!!!"],
- ["body", "Exciting%20offer"]]
- }
- end
-
- # TODO
- # Test registry
- it "does its best to extract components from URI::Generic objects" do
- # generic
- URISpec.components(URI("scheme://userinfo@host/path?query#fragment")).should == {
- scheme: "scheme",
- userinfo: "userinfo",
- host: "host",
- port: nil,
- path: "/path",
- query: "query",
- fragment: "fragment",
- registry: nil,
- opaque: nil
- }
-
- # gopher
- gopher = URI.parse('gopher://spinaltap.micro.umn.edu/00/Weather/California/Los%20Angeles')
- gopher.should be_kind_of(URI::Generic)
-
- URISpec.components(gopher).should == {
- scheme: "gopher",
- userinfo: nil,
- host: "spinaltap.micro.umn.edu",
- port: nil,
- path: "/00/Weather/California/Los%20Angeles",
- query: nil,
- fragment: nil,
- registry: nil,
- opaque: nil
- }
-
- # news
- news = URI.parse('news:comp.infosystems.www.servers.unix')
- news.should be_kind_of(URI::Generic)
- URISpec.components(news).should == {
- scheme: "news",
- userinfo: nil,
- host: nil,
- port: nil,
- path: nil,
- query: nil,
- fragment: nil,
- registry: nil,
- opaque: "comp.infosystems.www.servers.unix"
- }
-
- # telnet
- telnet = URI.parse('telnet://melvyl.ucop.edu/')
- telnet.should be_kind_of(URI::Generic)
- URISpec.components(telnet).should == {
- scheme: "telnet",
- userinfo: nil,
- host: "melvyl.ucop.edu",
- port: nil,
- path: "/",
- query: nil,
- fragment: nil,
- registry: nil,
- opaque: nil
- }
-
- # files
- file_l = URI.parse('file:///foo/bar.txt')
- file_l.should be_kind_of(URI::Generic)
- file = URI.parse('file:/foo/bar.txt')
- file.should be_kind_of(URI::Generic)
- end
-
- it "doesn't raise errors on URIs which has underscore in reg_name" do
- URI.parse('http://a_b:80/').host.should == "a_b"
- URI.parse('http://a_b/').host.should == "a_b"
- end
-end
diff --git a/spec/rubyspec/library/uri/parser/escape_spec.rb b/spec/rubyspec/library/uri/parser/escape_spec.rb
deleted file mode 100644
index 8682e0ebce..0000000000
--- a/spec/rubyspec/library/uri/parser/escape_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Parser#escape" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/parser/extract_spec.rb b/spec/rubyspec/library/uri/parser/extract_spec.rb
deleted file mode 100644
index 5dac947060..0000000000
--- a/spec/rubyspec/library/uri/parser/extract_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../shared/extract', __FILE__)
-require 'uri'
-
-describe "URI::Parser#extract" do
- it_behaves_like :uri_extract, :extract, URI::Parser.new
-end
diff --git a/spec/rubyspec/library/uri/parser/inspect_spec.rb b/spec/rubyspec/library/uri/parser/inspect_spec.rb
deleted file mode 100644
index 2eaeeeafee..0000000000
--- a/spec/rubyspec/library/uri/parser/inspect_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Parser#split" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/parser/join_spec.rb b/spec/rubyspec/library/uri/parser/join_spec.rb
deleted file mode 100644
index 1800a16236..0000000000
--- a/spec/rubyspec/library/uri/parser/join_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../shared/join', __FILE__)
-require 'uri'
-
-describe "URI::Parser#join" do
- it_behaves_like :uri_join, :join, URI::Parser.new
-end
diff --git a/spec/rubyspec/library/uri/parser/make_regexp_spec.rb b/spec/rubyspec/library/uri/parser/make_regexp_spec.rb
deleted file mode 100644
index e27f0d14db..0000000000
--- a/spec/rubyspec/library/uri/parser/make_regexp_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Parser#make_regexp" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/parser/parse_spec.rb b/spec/rubyspec/library/uri/parser/parse_spec.rb
deleted file mode 100644
index 76c1970645..0000000000
--- a/spec/rubyspec/library/uri/parser/parse_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../fixtures/classes', __FILE__)
-require File.expand_path('../../shared/parse', __FILE__)
-
-describe "URI::Parser#parse" do
- it_behaves_like :uri_parse, :parse, URI::Parser.new
-end
diff --git a/spec/rubyspec/library/uri/parser/split_spec.rb b/spec/rubyspec/library/uri/parser/split_spec.rb
deleted file mode 100644
index 2eaeeeafee..0000000000
--- a/spec/rubyspec/library/uri/parser/split_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Parser#split" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/parser/unescape_spec.rb b/spec/rubyspec/library/uri/parser/unescape_spec.rb
deleted file mode 100644
index 8ffc534226..0000000000
--- a/spec/rubyspec/library/uri/parser/unescape_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Parser#unescape" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/plus_spec.rb b/spec/rubyspec/library/uri/plus_spec.rb
deleted file mode 100644
index 45c1aa5e57..0000000000
--- a/spec/rubyspec/library/uri/plus_spec.rb
+++ /dev/null
@@ -1,459 +0,0 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require 'uri'
-
-#an alias of URI#merge
-describe "URI#+" do
- it "replaces the end of the path of the URI when added to a string that looks like a relative path" do
- (URI('http://foo') + 'bar').should == URI("http://foo/bar")
- (URI('http://foo/baz') + 'bar').should == URI("http://foo/bar")
- (URI('http://foo/baz/') + 'bar').should == URI("http://foo/baz/bar")
- (URI('mailto:[email protected]') + "#bar").should == URI("mailto:[email protected]#bar")
- end
-
- it "replaces the entire path of the URI when added to a string that begins with a /" do
- (URI('http://foo/baz/') + '/bar').should == URI("http://foo/bar")
- end
-
- it "replaces the entire url when added to a string that looks like a full url" do
- (URI.parse('http://a/b') + 'http://x/y').should == URI("http://x/y")
- (URI.parse('telnet:example.com') + 'http://x/y').should == URI("http://x/y")
- end
-
- it "canonicalizes the URI's path, removing ../'s" do
- (URI.parse('http://a/b/c/../') + "./").should == URI("http://a/b/")
- (URI.parse('http://a/b/c/../') + ".").should == URI("http://a/b/")
- (URI.parse('http://a/b/c/') + "../").should == URI("http://a/b/")
- (URI.parse('http://a/b/c/../../') + "./").should == URI("http://a/")
- (URI.parse('http://a/b/c/') + "../e/").should == URI("http://a/b/e/")
- (URI.parse('http://a/b/c/') + "../e/../").should == URI("http://a/b/")
- (URI.parse('http://a/b/../c/') + ".").should == URI("http://a/c/")
-
- (URI.parse('http://a/b/c/../../../') + ".").should == URI("http://a/")
- end
-
- it "doesn't conconicalize the path when adding to the empty string" do
- (URI.parse('http://a/b/c/../') + "").should == URI("http://a/b/c/../")
- end
-
- it "raises a URI::BadURIError when adding two relative URIs" do
- lambda {URI.parse('a/b/c') + "d"}.should raise_error(URI::BadURIError)
- end
-
- #Todo: make more BDD?
- it "conforms to the merge specifications from rfc 2396" do
- @url = 'http://a/b/c/d;p?q'
- @base_url = URI.parse(@url)
-
-# http://a/b/c/d;p?q
-# g:h = g:h
- url = @base_url.merge('g:h')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == 'g:h'
- url = @base_url.route_to('g:h')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == 'g:h'
-
-# http://a/b/c/d;p?q
-# g = http://a/b/c/g
- url = @base_url.merge('g')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/g'
- url = @base_url.route_to('http://a/b/c/g')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == 'g'
-
-# http://a/b/c/d;p?q
-# ./g = http://a/b/c/g
- url = @base_url.merge('./g')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/g'
- url = @base_url.route_to('http://a/b/c/g')
- url.should be_kind_of(URI::Generic)
- url.to_s.should_not == './g' # ok
- url.to_s.should == 'g'
-
-# http://a/b/c/d;p?q
-# g/ = http://a/b/c/g/
- url = @base_url.merge('g/')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/g/'
- url = @base_url.route_to('http://a/b/c/g/')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == 'g/'
-
-# http://a/b/c/d;p?q
-# /g = http://a/g
- url = @base_url.merge('/g')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/g'
- url = @base_url.route_to('http://a/g')
- url.should be_kind_of(URI::Generic)
- url.to_s.should_not == '/g' # ok
- url.to_s.should == '../../g'
-
-# http://a/b/c/d;p?q
-# //g = http://g
- url = @base_url.merge('//g')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://g'
- url = @base_url.route_to('http://g')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == '//g'
-
-# http://a/b/c/d;p?q
-# ?y = http://a/b/c/?y
- url = @base_url.merge('?y')
- url.should be_kind_of(URI::HTTP)
-
- url.to_s.should == 'http://a/b/c/d;p?y'
-
- url = @base_url.route_to('http://a/b/c/?y')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == '?y'
-
-# http://a/b/c/d;p?q
-# g?y = http://a/b/c/g?y
- url = @base_url.merge('g?y')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/g?y'
- url = @base_url.route_to('http://a/b/c/g?y')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == 'g?y'
-
-# http://a/b/c/d;p?q
-# #s = (current document)#s
- url = @base_url.merge('#s')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == @base_url.to_s + '#s'
- url = @base_url.route_to(@base_url.to_s + '#s')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == '#s'
-
-# http://a/b/c/d;p?q
-# g#s = http://a/b/c/g#s
- url = @base_url.merge('g#s')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/g#s'
- url = @base_url.route_to('http://a/b/c/g#s')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == 'g#s'
-
-# http://a/b/c/d;p?q
-# g?y#s = http://a/b/c/g?y#s
- url = @base_url.merge('g?y#s')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/g?y#s'
- url = @base_url.route_to('http://a/b/c/g?y#s')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == 'g?y#s'
-
-# http://a/b/c/d;p?q
-# ;x = http://a/b/c/;x
- url = @base_url.merge(';x')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/;x'
- url = @base_url.route_to('http://a/b/c/;x')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == ';x'
-
-# http://a/b/c/d;p?q
-# g;x = http://a/b/c/g;x
- url = @base_url.merge('g;x')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/g;x'
- url = @base_url.route_to('http://a/b/c/g;x')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == 'g;x'
-
-# http://a/b/c/d;p?q
-# g;x?y#s = http://a/b/c/g;x?y#s
- url = @base_url.merge('g;x?y#s')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/g;x?y#s'
- url = @base_url.route_to('http://a/b/c/g;x?y#s')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == 'g;x?y#s'
-
-# http://a/b/c/d;p?q
-# . = http://a/b/c/
- url = @base_url.merge('.')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/'
- url = @base_url.route_to('http://a/b/c/')
- url.should be_kind_of(URI::Generic)
- url.to_s.should_not == '.' # ok
- url.to_s.should == './'
-
-# http://a/b/c/d;p?q
-# ./ = http://a/b/c/
- url = @base_url.merge('./')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/'
- url = @base_url.route_to('http://a/b/c/')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == './'
-
-# http://a/b/c/d;p?q
-# .. = http://a/b/
- url = @base_url.merge('..')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/'
- url = @base_url.route_to('http://a/b/')
- url.should be_kind_of(URI::Generic)
- url.to_s.should_not == '..' # ok
- url.to_s.should == '../'
-
-# http://a/b/c/d;p?q
-# ../ = http://a/b/
- url = @base_url.merge('../')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/'
- url = @base_url.route_to('http://a/b/')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == '../'
-
-# http://a/b/c/d;p?q
-# ../g = http://a/b/g
- url = @base_url.merge('../g')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/g'
- url = @base_url.route_to('http://a/b/g')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == '../g'
-
-# http://a/b/c/d;p?q
-# ../.. = http://a/
- url = @base_url.merge('../..')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/'
- url = @base_url.route_to('http://a/')
- url.should be_kind_of(URI::Generic)
- url.to_s.should_not == '../..' # ok
- url.to_s.should == '../../'
-
-# http://a/b/c/d;p?q
-# ../../ = http://a/
- url = @base_url.merge('../../')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/'
- url = @base_url.route_to('http://a/')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == '../../'
-
-# http://a/b/c/d;p?q
-# ../../g = http://a/g
- url = @base_url.merge('../../g')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/g'
- url = @base_url.route_to('http://a/g')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == '../../g'
-
-# http://a/b/c/d;p?q
-# <> = (current document)
- url = @base_url.merge('')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/d;p?q'
- url = @base_url.route_to('http://a/b/c/d;p?q')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == ''
-
-# http://a/b/c/d;p?q
-# /./g = http://a/./g
- url = @base_url.merge('/./g')
- url.should be_kind_of(URI::HTTP)
-
- url.to_s.should == 'http://a/g'
-
- url = @base_url.route_to('http://a/./g')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == '/./g'
-
-# http://a/b/c/d;p?q
-# /../g = http://a/../g
- url = @base_url.merge('/../g')
- url.should be_kind_of(URI::HTTP)
-
- url.to_s.should == 'http://a/g'
-
- url = @base_url.route_to('http://a/../g')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == '/../g'
-
-# http://a/b/c/d;p?q
-# g. = http://a/b/c/g.
- url = @base_url.merge('g.')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/g.'
- url = @base_url.route_to('http://a/b/c/g.')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == 'g.'
-
-# http://a/b/c/d;p?q
-# .g = http://a/b/c/.g
- url = @base_url.merge('.g')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/.g'
- url = @base_url.route_to('http://a/b/c/.g')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == '.g'
-
-# http://a/b/c/d;p?q
-# g.. = http://a/b/c/g..
- url = @base_url.merge('g..')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/g..'
- url = @base_url.route_to('http://a/b/c/g..')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == 'g..'
-
-# http://a/b/c/d;p?q
-# ..g = http://a/b/c/..g
- url = @base_url.merge('..g')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/..g'
- url = @base_url.route_to('http://a/b/c/..g')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == '..g'
-
-# http://a/b/c/d;p?q
-# ../../../g = http://a/../g
- url = @base_url.merge('../../../g')
- url.should be_kind_of(URI::HTTP)
-
- url.to_s.should == 'http://a/g'
-
- url = @base_url.route_to('http://a/../g')
- url.should be_kind_of(URI::Generic)
- url.to_s.should_not == '../../../g' # ok? yes, it confuses you
- url.to_s.should == '/../g' # and it is clearly
-
-# http://a/b/c/d;p?q
-# ../../../../g = http://a/../../g
- url = @base_url.merge('../../../../g')
- url.should be_kind_of(URI::HTTP)
-
- url.to_s.should == 'http://a/g'
-
- url = @base_url.route_to('http://a/../../g')
- url.should be_kind_of(URI::Generic)
- url.to_s.should_not == '../../../../g' # ok? yes, it confuses you
- url.to_s.should == '/../../g' # and it is clearly
-
-# http://a/b/c/d;p?q
-# ./../g = http://a/b/g
- url = @base_url.merge('./../g')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/g'
- url = @base_url.route_to('http://a/b/g')
- url.should be_kind_of(URI::Generic)
- url.to_s.should_not == './../g' # ok
- url.to_s.should == '../g'
-
-# http://a/b/c/d;p?q
-# ./g/. = http://a/b/c/g/
- url = @base_url.merge('./g/.')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/g/'
- url = @base_url.route_to('http://a/b/c/g/')
- url.should be_kind_of(URI::Generic)
- url.to_s.should_not == './g/.' # ok
- url.to_s.should == 'g/'
-
-# http://a/b/c/d;p?q
-# g/./h = http://a/b/c/g/h
- url = @base_url.merge('g/./h')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/g/h'
- url = @base_url.route_to('http://a/b/c/g/h')
- url.should be_kind_of(URI::Generic)
- url.to_s.should_not == 'g/./h' # ok
- url.to_s.should == 'g/h'
-
-# http://a/b/c/d;p?q
-# g/../h = http://a/b/c/h
- url = @base_url.merge('g/../h')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/h'
- url = @base_url.route_to('http://a/b/c/h')
- url.should be_kind_of(URI::Generic)
- url.to_s.should_not == 'g/../h' # ok
- url.to_s.should == 'h'
-
-# http://a/b/c/d;p?q
-# g;x=1/./y = http://a/b/c/g;x=1/y
- url = @base_url.merge('g;x=1/./y')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/g;x=1/y'
- url = @base_url.route_to('http://a/b/c/g;x=1/y')
- url.should be_kind_of(URI::Generic)
- url.to_s.should_not == 'g;x=1/./y' # ok
- url.to_s.should == 'g;x=1/y'
-
-# http://a/b/c/d;p?q
-# g;x=1/../y = http://a/b/c/y
- url = @base_url.merge('g;x=1/../y')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/y'
- url = @base_url.route_to('http://a/b/c/y')
- url.should be_kind_of(URI::Generic)
- url.to_s.should_not == 'g;x=1/../y' # ok
- url.to_s.should == 'y'
-
-# http://a/b/c/d;p?q
-# g?y/./x = http://a/b/c/g?y/./x
- url = @base_url.merge('g?y/./x')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/g?y/./x'
- url = @base_url.route_to('http://a/b/c/g?y/./x')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == 'g?y/./x'
-
-# http://a/b/c/d;p?q
-# g?y/../x = http://a/b/c/g?y/../x
- url = @base_url.merge('g?y/../x')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/g?y/../x'
- url = @base_url.route_to('http://a/b/c/g?y/../x')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == 'g?y/../x'
-
-# http://a/b/c/d;p?q
-# g#s/./x = http://a/b/c/g#s/./x
- url = @base_url.merge('g#s/./x')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/g#s/./x'
- url = @base_url.route_to('http://a/b/c/g#s/./x')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == 'g#s/./x'
-
-# http://a/b/c/d;p?q
-# g#s/../x = http://a/b/c/g#s/../x
- url = @base_url.merge('g#s/../x')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http://a/b/c/g#s/../x'
- url = @base_url.route_to('http://a/b/c/g#s/../x')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == 'g#s/../x'
-
-# http://a/b/c/d;p?q
-# http:g = http:g ; for validating parsers
-# | http://a/b/c/g ; for backwards compatibility
- url = @base_url.merge('http:g')
- url.should be_kind_of(URI::HTTP)
- url.to_s.should == 'http:g'
- url = @base_url.route_to('http:g')
- url.should be_kind_of(URI::Generic)
- url.to_s.should == 'http:g'
- end
-end
-
-#TODO: incorporate these tests:
-#
-# u = URI.parse('http://foo/bar/baz')
-# assert_equal(nil, u.merge!(""))
-# assert_equal(nil, u.merge!(u))
-# assert(nil != u.merge!("."))
-# assert_equal('http://foo/bar/', u.to_s)
-# assert(nil != u.merge!("../baz"))
-# assert_equal('http://foo/baz', u.to_s)
diff --git a/spec/rubyspec/library/uri/regexp_spec.rb b/spec/rubyspec/library/uri/regexp_spec.rb
deleted file mode 100644
index cf63507013..0000000000
--- a/spec/rubyspec/library/uri/regexp_spec.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require 'uri'
-
-#I'm more or less ok with these limited tests, as the more extensive extract tests
-#use URI.regexp
-describe "URI.regexp" do
- it "behaves according to the MatzRuby tests" do
- URI.regexp.should == URI.regexp
- 'x http:// x'.slice(URI.regexp).should == 'http://'
- 'x http:// x'.slice(URI.regexp(['http'])).should == 'http://'
- 'x http:// x ftp://'.slice(URI.regexp(['http'])).should == 'http://'
- 'http://'.slice(URI.regexp([])).should == nil
- ''.slice(URI.regexp).should == nil
- 'xxxx'.slice(URI.regexp).should == nil
- ':'.slice(URI.regexp).should == nil
- 'From:'.slice(URI.regexp).should == 'From:'
- end
-end
diff --git a/spec/rubyspec/library/uri/route_from_spec.rb b/spec/rubyspec/library/uri/route_from_spec.rb
deleted file mode 100644
index 11a2c44f90..0000000000
--- a/spec/rubyspec/library/uri/route_from_spec.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI#route_from" do
-
- #this could be split out a good bit better
- it "gives the minimal difference between the current URI and the target" do
- URI("http://example.com/a.html").route_from('http://example.com/a.html').to_s.should == ""
- URI("http://example.com/a.html").route_from('http://example.com/b.html').to_s.should == "a.html"
- URI("http://example.com/a/").route_from('http://example.com/b/').to_s.should == "../a/"
- URI("http://example.com/b/").route_from('http://example.com/a/c').to_s.should == "../b/"
- URI("http://example.com/b/").route_from('http://example.com/a/b/').to_s.should == "../../b/"
- URI("http://example.com/b/").route_from('http://EXAMPLE.cOm/a/b/').to_s.should == "../../b/"
- URI("http://example.net/b/").route_from('http://example.com/a/b/').to_s.should == "//example.net/b/"
- URI("mailto:[email protected]#bar").route_from('mailto:[email protected]').to_s.should == "#bar"
- end
-
- it "accepts a string-like argument" do
- str = mock('string-like')
- str.should_receive(:to_str).and_return("http://example.com/b.html")
- URI("http://example.com/a.html").route_from(str).to_s.should == "a.html"
- end
-end
diff --git a/spec/rubyspec/library/uri/route_to_spec.rb b/spec/rubyspec/library/uri/route_to_spec.rb
deleted file mode 100644
index 2eb68afdfd..0000000000
--- a/spec/rubyspec/library/uri/route_to_spec.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI#route_to" do
-
- #this could be split out a good bit better
- it "gives the minimal difference between the current URI and the target" do
- URI("http://example.com/a.html").route_to('http://example.com/a.html').to_s.should == ""
- URI("http://example.com/a.html").route_to('http://example.com/b.html').to_s.should == "b.html"
- URI("http://example.com/a/").route_to('http://example.com/b/').to_s.should == "../b/"
- URI("http://example.com/a/c").route_to('http://example.com/b/').to_s.should == "../b/"
- URI("http://example.com/a/b/").route_to('http://example.com/b/').to_s.should == "../../b/"
- URI("http://example.com/a/b/").route_to('http://EXAMPLE.cOm/b/').to_s.should == "../../b/"
- URI("http://example.com/a/b/").route_to('http://example.net/b/').to_s.should == "//example.net/b/"
- URI("mailto:[email protected]").route_to('mailto:[email protected]#bar').to_s.should == "#bar"
-
- #this was a little surprising to me
- URI("mailto:[email protected]#bar").route_to('mailto:[email protected]').to_s.should == ""
- end
-
- it "accepts a string-like argument" do
- str = mock('string-like')
- str.should_receive(:to_str).and_return("http://example.com/b.html")
- URI("http://example.com/a.html").route_to(str).to_s.should == "b.html"
- end
-end
diff --git a/spec/rubyspec/library/uri/select_spec.rb b/spec/rubyspec/library/uri/select_spec.rb
deleted file mode 100644
index 46474757cc..0000000000
--- a/spec/rubyspec/library/uri/select_spec.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI#select" do
- it "takes any number of component names as symbols, and returns an array of those components" do
- URI("http://host:8080/path/").select.should == []
- URI("http://host:8080/path/").select(:scheme,:host,:port,:path).should == [
- "http","host",8080,"/path/"]
- end
-
- it "returns nil for any valid component that isn't set and doesn't have a default" do
- uri = URI("http://host")
- uri.select(:userinfo, :query, :fragment).should == [nil] * 3
- uri.select(:port, :path).should == [80, '']
- end
-
- it "raises an ArgumentError if a component is requested that isn't valid under the given scheme" do
- [
- lambda {URI("mailto:[email protected]").select(:path)},
- lambda {URI("http://blog.blag.web").select(:typecode)},
- ].each do |select_lambda|
- select_lambda.should raise_error(ArgumentError)
- end
- end
-
- it "raises an ArgumentError if given strings rather than symbols" do
- lambda {
- URI("http://host:8080/path/").select("scheme","host","port",'path')
- }.should raise_error(ArgumentError)
- end
-end
diff --git a/spec/rubyspec/library/uri/set_component_spec.rb b/spec/rubyspec/library/uri/set_component_spec.rb
deleted file mode 100644
index 9b8372108a..0000000000
--- a/spec/rubyspec/library/uri/set_component_spec.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require 'uri'
-
-#TODO: make this more BDD
-describe "URI#select" do
- it "conforms to the MatzRuby tests" do
- uri = URI.parse('http://foo:bar@baz')
- (uri.user = 'oof').should == 'oof'
- uri.to_s.should == 'http://oof:bar@baz'
- (uri.password = 'rab').should == 'rab'
- uri.to_s.should == 'http://oof:rab@baz'
- (uri.userinfo = 'foo').should == 'foo'
- uri.to_s.should == 'http://foo:rab@baz'
- (uri.userinfo = ['foo', 'bar']).should == ['foo', 'bar']
- uri.to_s.should == 'http://foo:bar@baz'
- (uri.userinfo = ['foo']).should == ['foo']
- uri.to_s.should == 'http://foo:bar@baz'
- (uri.host = 'zab').should == 'zab'
- uri.to_s.should == 'http://foo:bar@zab'
- (uri.port = 8080).should == 8080
- uri.to_s.should == 'http://foo:bar@zab:8080'
- (uri.path = '/').should == '/'
- uri.to_s.should == 'http://foo:bar@zab:8080/'
- (uri.query = 'a=1').should == 'a=1'
- uri.to_s.should == 'http://foo:bar@zab:8080/?a=1'
- (uri.fragment = 'b123').should == 'b123'
- uri.to_s.should == 'http://foo:bar@zab:8080/?a=1#b123'
-
- uri = URI.parse('http://example.com')
- lambda { uri.password = 'bar' }.should raise_error(URI::InvalidURIError)
- uri.userinfo = 'foo:bar'
- uri.to_s.should == 'http://foo:[email protected]'
- lambda { uri.registry = 'bar' }.should raise_error(URI::InvalidURIError)
- lambda { uri.opaque = 'bar' }.should raise_error(URI::InvalidURIError)
-
- uri = URI.parse('mailto:[email protected]')
- lambda { uri.user = 'bar' }.should raise_error(URI::InvalidURIError)
- lambda { uri.password = 'bar' }.should raise_error(URI::InvalidURIError)
- lambda { uri.userinfo = ['bar', 'baz'] }.should raise_error(URI::InvalidURIError)
- lambda { uri.host = 'bar' }.should raise_error(URI::InvalidURIError)
- lambda { uri.port = 'bar' }.should raise_error(URI::InvalidURIError)
- lambda { uri.path = 'bar' }.should raise_error(URI::InvalidURIError)
- lambda { uri.query = 'bar' }.should raise_error(URI::InvalidURIError)
- end
-end
-
-
diff --git a/spec/rubyspec/library/uri/shared/eql.rb b/spec/rubyspec/library/uri/shared/eql.rb
deleted file mode 100644
index 2cc960d39a..0000000000
--- a/spec/rubyspec/library/uri/shared/eql.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-describe :uri_eql, shared: true do
- it "returns false if the normalized forms are different" do
- URISpec::NORMALIZED_FORMS.each do |form|
- normal_uri = URI(form[:normalized])
- form[:different].each do |other|
- URI(other).send(@method, normal_uri).should be_false
- end
- end
- end
-end
-
-describe :uri_eql_against_other_types, shared: true do
- it "returns false for when compared to non-uri objects" do
- URI("http://example.com/").send(@method, "http://example.com/").should be_false
- URI("http://example.com/").send(@method, nil).should be_false
- end
-end
diff --git a/spec/rubyspec/library/uri/shared/extract.rb b/spec/rubyspec/library/uri/shared/extract.rb
deleted file mode 100644
index efe60ae4b9..0000000000
--- a/spec/rubyspec/library/uri/shared/extract.rb
+++ /dev/null
@@ -1,83 +0,0 @@
-describe :uri_extract, shared: true do
- it "behaves according to its documentation" do
- @object.extract("text here http://foo.example.org/bla and here mailto:[email protected] and here also.").should == ["http://foo.example.org/bla", "mailto:[email protected]"]
- end
-
- it "treats contiguous URIs as a single URI" do
- @object.extract('http://example.jphttp://example.jp').should == ['http://example.jphttp://example.jp']
- end
-
- it "treats pretty much anything with a colon as a URI" do
- @object.extract('From: XXX [mailto:[email protected]]').should == ['From:', 'mailto:[email protected]]']
- end
-
- it "wraps a URI string in an array" do
- @object.extract("http://github.com/brixen/rubyspec/tree/master").should == ["http://github.com/brixen/rubyspec/tree/master"]
- end
-
- it "pulls a variety of protocol URIs from a string" do
- @object.extract("this is a string, it has http://rubini.us/ in it").should == ["http://rubini.us/"]
- @object.extract("mailto:[email protected]").should == ["mailto:[email protected]"]
- @object.extract("ftp://ruby-lang.org/").should == ["ftp://ruby-lang.org/"]
- @object.extract("https://mail.google.com").should == ["https://mail.google.com"]
- @object.extract("anything://example.com/").should == ["anything://example.com/"]
- end
-
- it "pulls all URIs within a string in order into an array when a block is not given" do
- @object.extract("1.3. Example URI
-
- The following examples illustrate URI that are in common use.
-
- ftp://ftp.is.co.za/rfc/rfc1808.txt
- -- ftp scheme for File Transfer Protocol services
-
- gopher://spinaltap.micro.umn.edu/00/Weather/California/Los%20Angeles
- -- gopher scheme for Gopher and Gopher+ Protocol services
-
- http://www.math.uio.no/faq/compression-faq/part1.html
- -- http scheme for Hypertext Transfer Protocol services
-
- -- mailto scheme for electronic mail addresses
-
- news:comp.infosystems.www.servers.unix
- -- news scheme for USENET news groups and articles
-
- telnet://melvyl.ucop.edu/
- -- telnet scheme for interactive services via the TELNET Protocol
- ").should == ["ftp://ftp.is.co.za/rfc/rfc1808.txt","gopher://spinaltap.micro.umn.edu/00/Weather/California/Los%20Angeles","http://www.math.uio.no/faq/compression-faq/part1.html","mailto:[email protected]","news:comp.infosystems.www.servers.unix","telnet://melvyl.ucop.edu/"]
- end
-
- it "yields each URI in the given string in order to a block, if given, and returns nil" do
- results = ["http://foo.example.org/bla", "mailto:[email protected]"]
- @object.extract("text here http://foo.example.org/bla and here mailto:[email protected] and here also.") {|uri|
- uri.should == results.shift
- }.should == nil
- results.should == []
- end
-
- it "allows the user to specify a list of acceptable protocols of URIs to scan for" do
- @object.extract("1.3. Example URI
-
- The following examples illustrate URI that are in common use.
-
- ftp://ftp.is.co.za/rfc/rfc1808.txt
- -- ftp scheme for File Transfer Protocol services
-
- gopher://spinaltap.micro.umn.edu/00/Weather/California/Los%20Angeles
- -- gopher scheme for Gopher and Gopher+ Protocol services
-
- http://www.math.uio.no/faq/compression-faq/part1.html
- -- http scheme for Hypertext Transfer Protocol services
-
- -- mailto scheme for electronic mail addresses
-
- news:comp.infosystems.www.servers.unix
- -- news scheme for USENET news groups and articles
-
- telnet://melvyl.ucop.edu/
- -- telnet scheme for interactive services via the TELNET Protocol
- ", ["http","ftp","mailto"]).should == ["ftp://ftp.is.co.za/rfc/rfc1808.txt","http://www.math.uio.no/faq/compression-faq/part1.html","mailto:[email protected]"]
- end
-end
diff --git a/spec/rubyspec/library/uri/shared/join.rb b/spec/rubyspec/library/uri/shared/join.rb
deleted file mode 100644
index dfe44e9be2..0000000000
--- a/spec/rubyspec/library/uri/shared/join.rb
+++ /dev/null
@@ -1,54 +0,0 @@
-describe :uri_join, shared: true do
- it "returns a URI object of the concatenation of a protocol and domain, and a path" do
- @object.join("http://localhost/","main.rbx").should == URI.parse("http://localhost/main.rbx")
- end
-
- it "accepts URI objects" do
- @object.join(URI("http://localhost/"),"main.rbx").should == URI.parse("http://localhost/main.rbx")
- @object.join("http://localhost/",URI("main.rbx")).should == URI.parse("http://localhost/main.rbx")
- @object.join(URI("http://localhost/"),URI("main.rbx")).should == URI.parse("http://localhost/main.rbx")
- end
-
- it "accepts string-like arguments with to_str" do
- str = mock('string-like')
- str.should_receive(:to_str).and_return("http://ruby-lang.org")
- str2 = mock('string-like also')
- str2.should_receive(:to_str).and_return("foo/bar")
- @object.join(str, str2).should == URI.parse("http://ruby-lang.org/foo/bar")
- end
-
- it "raises an error if given no argument" do
- lambda{ @object.join }.should raise_error
- end
-
- it "doesn't create redundant '/'s" do
- @object.join("http://localhost/", "/main.rbx").should == URI.parse("http://localhost/main.rbx")
- end
-
- it "discards arguments given before an absolute uri" do
- @object.join("http://localhost/a/b/c/d", "http://ruby-lang.com/foo", "bar").should == URI.parse("http://ruby-lang.com/bar")
- end
-
- it "resolves .. in paths" do
- @object.join("http://localhost/a/b/c/d", "../../e/f", "g/h/../i").to_s.should == "http://localhost/a/e/g/i"
- end
-end
-
-
-# assert_equal(URI.parse('http://foo/bar'), URI.join('http://foo/bar'))
-# assert_equal(URI.parse('http://foo/bar'), URI.join('http://foo', 'bar'))
-# assert_equal(URI.parse('http://foo/bar/'), URI.join('http://foo', 'bar/'))
-#
-# assert_equal(URI.parse('http://foo/baz'), URI.join('http://foo', 'bar', 'baz'))
-# assert_equal(URI.parse('http://foo/baz'), URI.join('http://foo', 'bar', '/baz'))
-# assert_equal(URI.parse('http://foo/baz/'), URI.join('http://foo', 'bar', '/baz/'))
-# assert_equal(URI.parse('http://foo/bar/baz'), URI.join('http://foo', 'bar/', 'baz'))
-# assert_equal(URI.parse('http://foo/hoge'), URI.join('http://foo', 'bar', 'baz', 'hoge'))
-#
-# assert_equal(URI.parse('http://foo/bar/baz'), URI.join('http://foo', 'bar/baz'))
-# assert_equal(URI.parse('http://foo/bar/hoge'), URI.join('http://foo', 'bar/baz', 'hoge'))
-# assert_equal(URI.parse('http://foo/bar/baz/hoge'), URI.join('http://foo', 'bar/baz/', 'hoge'))
-# assert_equal(URI.parse('http://foo/hoge'), URI.join('http://foo', 'bar/baz', '/hoge'))
-# assert_equal(URI.parse('http://foo/bar/hoge'), URI.join('http://foo', 'bar/baz', 'hoge'))
-# assert_equal(URI.parse('http://foo/bar/baz/hoge'), URI.join('http://foo', 'bar/baz/', 'hoge'))
-# assert_equal(URI.parse('http://foo/hoge'), URI.join('http://foo', 'bar/baz', '/hoge'))
diff --git a/spec/rubyspec/library/uri/shared/parse.rb b/spec/rubyspec/library/uri/shared/parse.rb
deleted file mode 100644
index 5ecbffcaf2..0000000000
--- a/spec/rubyspec/library/uri/shared/parse.rb
+++ /dev/null
@@ -1,199 +0,0 @@
-describe :uri_parse, shared: true do
- it "returns a URI::HTTP object when parsing an HTTP URI" do
- @object.parse("http://www.example.com/").should be_kind_of(URI::HTTP)
- end
-
- it "populates the components of a parsed URI::HTTP, setting the port to 80 by default" do
- # general case
- URISpec.components(@object.parse("http://user:[email protected]/path/?query=val&q2=val2#fragment")).should == {
- scheme: "http",
- userinfo: "user:pass",
- host: "example.com",
- port: 80,
- path: "/path/",
- query: "query=val&q2=val2",
- fragment: "fragment"
- }
-
- # multiple paths
- URISpec.components(@object.parse("http://a/b/c/d;p?q")).should == {
- scheme: "http",
- userinfo: nil,
- host: "a",
- port: 80,
- path: "/b/c/d;p",
- query: "q",
- fragment: nil
- }
-
- # multi-level domain
- URISpec.components(@object.parse('http://www.math.uio.no/faq/compression-faq/part1.html')).should == {
- scheme: "http",
- userinfo: nil,
- host: "www.math.uio.no",
- port: 80,
- path: "/faq/compression-faq/part1.html",
- query: nil,
- fragment: nil
- }
- end
-
- it "parses out the port number of a URI, when given" do
- @object.parse("http://example.com:8080/").port.should == 8080
- end
-
- it "returns a URI::HTTPS object when parsing an HTTPS URI" do
- @object.parse("https://important-intern-net.net").should be_kind_of(URI::HTTPS)
- end
-
- it "sets the port of a parsed https URI to 443 by default" do
- @object.parse("https://example.com/").port.should == 443
- end
-
- it "populates the components of a parsed URI::FTP object" do
- # generic, empty password.
- url = @object.parse("ftp://[email protected]/pub/ruby/1.8/ruby-1.8.6.tar.bz2;type=i")
- url.should be_kind_of(URI::FTP)
- URISpec.components(url).should == {
- scheme: "ftp",
- userinfo: "anonymous",
- host: "ruby-lang.org",
- port: 21,
- path: "pub/ruby/1.8/ruby-1.8.6.tar.bz2",
- typecode: "i"
- }
-
- # multidomain, no user or password
- url = @object.parse('ftp://ftp.is.co.za/rfc/rfc1808.txt')
- url.should be_kind_of(URI::FTP)
- URISpec.components(url).should == {
- scheme: "ftp",
- userinfo: nil,
- host: "ftp.is.co.za",
- port: 21,
- path: "rfc/rfc1808.txt",
- typecode: nil
- }
-
- # empty user
- url = @object.parse('ftp://:pass@localhost/')
- url.should be_kind_of(URI::FTP)
- URISpec.components(url).should == {
- scheme: "ftp",
- userinfo: ":pass",
- host: "localhost",
- port: 21,
- path: "",
- typecode: nil
- }
- url.password.should == "pass"
- end
-
- it "returns a URI::LDAP object when parsing an LDAP URI" do
- #taken from http://www.faqs.org/rfcs/rfc2255.html 'cause I don't really know what an LDAP url looks like
- ldap_uris = %w{ ldap:///o=University%20of%20Michigan,c=US ldap://ldap.itd.umich.edu/o=University%20of%20Michigan,c=US ldap://ldap.itd.umich.edu/o=University%20of%20Michigan,c=US?postalAddress ldap://host.com:6666/o=University%20of%20Michigan,c=US??sub?(cn=Babs%20Jensen) ldap://ldap.itd.umich.edu/c=GB?objectClass?one ldap://ldap.question.com/o=Question%3f,c=US?mail ldap://ldap.netscape.com/o=Babsco,c=US??(int=%5c00%5c00%5c00%5c04) ldap:///??sub??bindname=cn=Manager%2co=Foo ldap:///??sub??!bindname=cn=Manager%2co=Foo }
- ldap_uris.each do |ldap_uri|
- @object.parse(ldap_uri).should be_kind_of(URI::LDAP)
- end
- end
-
- it "populates the components of a parsed URI::LDAP object" do
- URISpec.components(@object.parse("ldap://ldap.itd.umich.edu/o=University%20of%20Michigan,c=US?postalAddress?scope?filter?extensions")).should == {
- scheme: "ldap",
- host: "ldap.itd.umich.edu",
- port: 389,
- dn: "o=University%20of%20Michigan,c=US",
- attributes: "postalAddress",
- scope: "scope",
- filter: "filter",
- extensions: "extensions"
- }
- end
-
- it "returns a URI::MailTo object when passed a mailto URI" do
- @object.parse("mailto:[email protected]").should be_kind_of(URI::MailTo)
- end
-
- it "populates the components of a parsed URI::MailTo object" do
- URISpec.components(@object.parse("mailto:[email protected]?subject=Discounts%20On%20Imported%20methods!!!&body=Exciting%20offer")).should == {
- scheme: "mailto",
- headers: [["subject","Discounts%20On%20Imported%20methods!!!"],
- ["body", "Exciting%20offer"]]
- }
- end
-
- # TODO
- # Test registry
- it "does its best to extract components from URI::Generic objects" do
- # generic
- URISpec.components(URI("scheme://userinfo@host/path?query#fragment")).should == {
- scheme: "scheme",
- userinfo: "userinfo",
- host: "host",
- port: nil,
- path: "/path",
- query: "query",
- fragment: "fragment",
- registry: nil,
- opaque: nil
- }
-
- # gopher
- gopher = @object.parse('gopher://spinaltap.micro.umn.edu/00/Weather/California/Los%20Angeles')
- gopher.should be_kind_of(URI::Generic)
-
- URISpec.components(gopher).should == {
- scheme: "gopher",
- userinfo: nil,
- host: "spinaltap.micro.umn.edu",
- port: nil,
- path: "/00/Weather/California/Los%20Angeles",
- query: nil,
- fragment: nil,
- registry: nil,
- opaque: nil
- }
-
- # news
- news = @object.parse('news:comp.infosystems.www.servers.unix')
- news.should be_kind_of(URI::Generic)
- URISpec.components(news).should == {
- scheme: "news",
- userinfo: nil,
- host: nil,
- port: nil,
- path: nil,
- query: nil,
- fragment: nil,
- registry: nil,
- opaque: "comp.infosystems.www.servers.unix"
- }
-
- # telnet
- telnet = @object.parse('telnet://melvyl.ucop.edu/')
- telnet.should be_kind_of(URI::Generic)
- URISpec.components(telnet).should == {
- scheme: "telnet",
- userinfo: nil,
- host: "melvyl.ucop.edu",
- port: nil,
- path: "/",
- query: nil,
- fragment: nil,
- registry: nil,
- opaque: nil
- }
-
- # files
- file_l = @object.parse('file:///foo/bar.txt')
- file_l.should be_kind_of(URI::Generic)
- file = @object.parse('file:/foo/bar.txt')
- file.should be_kind_of(URI::Generic)
- end
-
- it "raises errors on malformed URIs" do
- lambda { @object.parse('http://a_b:80/') }.should raise_error(URI::InvalidURIError)
- lambda { @object.parse('http://a_b/') }.should raise_error(URI::InvalidURIError)
- end
-end
diff --git a/spec/rubyspec/library/uri/split_spec.rb b/spec/rubyspec/library/uri/split_spec.rb
deleted file mode 100644
index f0ab6ff35c..0000000000
--- a/spec/rubyspec/library/uri/split_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI.split" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/library/uri/uri_spec.rb b/spec/rubyspec/library/uri/uri_spec.rb
deleted file mode 100644
index 90936a770f..0000000000
--- a/spec/rubyspec/library/uri/uri_spec.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require 'uri'
-
-#the testing is light here as this is an alias for URI.parse
-
-#we're just testing that the method ends up in the right place
-describe "the URI method" do
- it "parses a given URI, returning a URI object" do
- result = URI.parse("http://ruby-lang.org")
- URI("http://ruby-lang.org").should == result
- Kernel::URI("http://ruby-lang.org").should == result
- end
-
- it "converts its argument with to_str" do
- str = mock('string-like')
- str.should_receive(:to_str).and_return("http://ruby-lang.org")
- URI(str).should == URI.parse("http://ruby-lang.org")
- end
-
- it "returns the argument if it is a URI object" do
- result = URI.parse("http://ruby-lang.org")
- URI(result).should equal(result)
- end
-
- #apparently this was a concern? imported from MRI tests
- it "does not add a URI method to Object instances" do
- lambda {Object.new.URI("http://ruby-lang.org/")}.should raise_error(NoMethodError)
- end
-end
diff --git a/spec/rubyspec/library/uri/util/make_components_hash_spec.rb b/spec/rubyspec/library/uri/util/make_components_hash_spec.rb
deleted file mode 100644
index 0f491112e8..0000000000
--- a/spec/rubyspec/library/uri/util/make_components_hash_spec.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require 'uri'
-
-describe "URI::Util.make_components_hash" do
- it "needs to be reviewed for spec completeness"
-end