RSpec Code Examples

 

 

Addressable::IDNA when using the pure-Ruby implementation
should convert 'www.google.com' correctly
should convert 'www.詹姆斯.com' correctly
should convert 'www.Iñtërnâtiônàlizætiøn.com' correctly
should convert 'www.Iñtërnâtiônàlizætiøn.com' correctly
should convert 'www.ほんとうにながいわけのわからないどめいんめいのらべるまだながくしないとたりない.w3.mag.keio.ac.jp' correctly
should convert 'www.ほんとうにながいわけのわからないどめいんめいのらべるまだながくしないとたりない.w3.mag.keio.ac.jp' correctly
should convert '点心和烤鸭.w3.mag.keio.ac.jp' correctly
should convert '가각갂갃간갅갆갇갈갉힢힣.com' correctly
should convert '碼標準萬國碼.com' correctly
should convert 'リ宠퐱〹.com' correctly
should convert 'リ宠퐱卄.com' correctly
should convert 'ᆵ' correctly
should convert 'ᆵ' correctly
should convert 'www.google.com' correctly
should convert 'www.詹姆斯.com' correctly
should convert 'www.iñtërnâtiônàlizætiøn.com' correctly
should convert 'www.ほんとうにながいわけのわからないどめいんめいのらべるまだながくしないとたりない.w3.mag.keio.ac.jp' correctly
should convert '点心和烤鸭.w3.mag.keio.ac.jp' correctly
should convert '가각갂갃간갅갆갇갈갉힢힣.com' correctly
should convert '碼標準萬國碼.com' correctly
should convert 'リ宠퐱卄.com' correctly
should convert 'ᆵ' correctly
Addressable::IDNA when using the native-code implementation
should convert 'www.google.com' correctly
should convert 'www.詹姆斯.com' correctly
should convert 'www.Iñtërnâtiônàlizætiøn.com' correctly
should convert 'www.Iñtërnâtiônàlizætiøn.com' correctly
should convert 'www.ほんとうにながいわけのわからないどめいんめいのらべるまだながくしないとたりない.w3.mag.keio.ac.jp' correctly
should convert 'www.ほんとうにながいわけのわからないどめいんめいのらべるまだながくしないとたりない.w3.mag.keio.ac.jp' correctly
should convert '点心和烤鸭.w3.mag.keio.ac.jp' correctly
should convert '가각갂갃간갅갆갇갈갉힢힣.com' correctly
should convert '碼標準萬國碼.com' correctly
should convert 'リ宠퐱〹.com' correctly
should convert 'リ宠퐱卄.com' correctly
should convert 'ᆵ' correctly
should convert 'ᆵ' correctly
should convert 'www.google.com' correctly
should convert 'www.詹姆斯.com' correctly
should convert 'www.iñtërnâtiônàlizætiøn.com' correctly
should convert 'www.ほんとうにながいわけのわからないどめいんめいのらべるまだながくしないとたりない.w3.mag.keio.ac.jp' correctly
should convert '点心和烤鸭.w3.mag.keio.ac.jp' correctly
should convert '가각갂갃간갅갆갇갈갉힢힣.com' correctly
should convert '碼標準萬國碼.com' correctly
should convert 'リ宠퐱卄.com' correctly
should convert 'ᆵ' correctly
Net::HTTP
should be compatible with Addressable
Addressable::Template
should raise a TypeError for invalid patterns
Addressable::Template created with the pattern '/'
should have no variables
should have the correct mapping when extracting from '/'
Addressable::URI when parsed from '/one/'
should not match the pattern '/two/'
should have the correct mapping when extracting values using the pattern '/{number}/'
Addressable::Template created with the pattern '/{number}/'
should have the variables ['number']
should not match the pattern '/'
should match the pattern '/two/'
Addressable::Template created with the pattern '/{number}/{number}/'
should have one variable
should have the correct mapping when extracting from '/1/1/'
should not match '/1/2/'
should not match '/2/1/'
should not match '/1/'
should not match '/1/1/1/'
should not match '/1/2/3/'
Addressable::Template created with the pattern '/{number}{-prefix|.|number}'
should have one variable
should have the correct mapping when extracting from '/1.1'
should have the correct mapping when extracting from '/99.99'
should not match '/1.2'
should not match '/2.1'
should not match '/1'
should not match '/1.1.1'
should not match '/1.23'
Addressable::Template created with the pattern '/{number}/{-suffix|/|number}'
should have one variable
should have the correct mapping when extracting from '/1/1/'
should have the correct mapping when extracting from '/99/99/'
should not match '/1/1'
should not match '/11/'
should not match '/1/2/'
should not match '/2/1/'
should not match '/1/'
should not match '/1/1/1/'
should not match '/1/23/'
Addressable::Template created with the pattern '/{number}/?{-join|&|number}'
should have one variable
should have the correct mapping when extracting from '/1/?number=1'
should have the correct mapping when extracting from '/99/?number=99'
should have the correct mapping when extracting from '/1/?number=1&letter=a'
should not match '/1/?number=1&bogus=foo'
should not match '/1/?number=2'
should not match '/2/?number=1'
should not match '/1/?'
Addressable::Template created with the pattern '/{number}/{-list|/|number}/'
should have one variable
should not match '/1/1/'
should not match '/1/2/'
should not match '/2/1/'
should not match '/1/1/1/'
should not match '/1/1/1/1/'
Addressable::Template created with the pattern 'http://www.example.com/?{-join|&|query,number}'
when inspected, should have the correct class name
when inspected, should have the correct object id
should have the variables ['query', 'number']
should not match the pattern 'http://www.example.com/'
should match the pattern 'http://www.example.com/?'
should match the pattern 'http://www.example.com/?query=mycelium'
should match the pattern 'http://www.example.com/?query=mycelium&number=100'
Addressable::URI when parsed from '/one/two/'
should not match the pattern '/{number}/' with the SlashlessProcessor
should have the correct mapping when extracting values using the pattern '/{number}/' without a processor
should have the correct mapping when extracting values using the pattern '/{first}/{second}/' with the SlashlessProcessor
Addressable::URI when parsed from 'http://example.com/search/an+example+search+query/'
should have the correct mapping when extracting values using the pattern 'http://example.com/search/{query}/' with the ExampleProcessor
should have the correct mapping when extracting values using the pattern 'http://example.com/search/{-list|+|query}/'
should return nil when extracting values using a non-matching pattern
Addressable::URI when parsed from 'http://example.com/a/b/c/'
should have the correct mapping when extracting values using the pattern 'http://example.com/{first}/{second}/' with the ExampleProcessor
should have the correct mapping when extracting values using the pattern 'http://example.com/{first}/{-list|/|second}/'
should have the correct mapping when extracting values using the pattern 'http://example.com/{first}/{-list|/|rot13}/' with the ExampleProcessor
should have the correct mapping when extracting values using the pattern 'http://example.com/{-list|/|rot13}/' with the ExampleProcessor
should not map to anything when extracting values using the pattern 'http://example.com/{-list|/|rot13}/'
Addressable::URI when parsed from 'http://example.com/?a=one&b=two&c=three'
should have the correct mapping when extracting values using the pattern 'http://example.com/?{-join|&|a,b,c}'
Addressable::URI when parsed from 'http://example.com/?rot13=frperg'
should have the correct mapping when extracting values using the pattern 'http://example.com/?{-join|&|rot13}' with the ExampleProcessor
Addressable::URI when parsed from 'http://example.org///something///'
should have the correct mapping when extracting values using the pattern 'http://example.org{-prefix|/|parts}/'
should have the correct mapping when extracting values using the pattern 'http://example.org/{-suffix|/|parts}'
should have the correct mapping when extracting values using the pattern 'http://example.org/{-list|/|parts}'
Addressable::URI when parsed from 'http://example.com/one/spacer/two/'
should have the correct mapping when extracting values using the pattern 'http://example.com/{first}/spacer/{second}/'
should have the correct mapping when extracting values using the pattern 'http://example.com{-prefix|/|stuff}/'
should have the correct mapping when extracting values using the pattern 'http://example.com/o{-prefix|/|stuff}/'
should have the correct mapping when extracting values using the pattern 'http://example.com/{first}/spacer{-prefix|/|stuff}/'
should not match anything when extracting values using the incorrect suffix pattern 'http://example.com/{-prefix|/|stuff}/'
should have the correct mapping when extracting values using the pattern 'http://example.com{-prefix|/|rot13}/' with the ExampleProcessor
should have the correct mapping when extracting values using the pattern 'http://example.com{-prefix|/|rot13}' with the ExampleProcessor
should not match anything when extracting values using the incorrect suffix pattern 'http://example.com/{-prefix|/|rot13}' with the ExampleProcessor
should have the correct mapping when extracting values using the pattern 'http://example.com/{-suffix|/|stuff}'
should have the correct mapping when extracting values using the pattern 'http://example.com/{-suffix|/|stuff}o'
should have the correct mapping when extracting values using the pattern 'http://example.com/o{-suffix|/|stuff}'
should have the correct mapping when extracting values using the pattern 'http://example.com/{first}/spacer/{-suffix|/|stuff}'
should not match anything when extracting values using the incorrect suffix pattern 'http://example.com/{-suffix|/|stuff}/'
should have the correct mapping when extracting values using the pattern 'http://example.com/{-suffix|/|rot13}' with the ExampleProcessor
should have the correct mapping when extracting values using the pattern 'http://example.com{-suffix|/|rot13}' with the ExampleProcessor
should not match anything when extracting values using the incorrect suffix pattern 'http://example.com/{-suffix|/|rot13}/' with the ExampleProcessor
Addressable::URI when parsed from 'http://example.com/?email=bob@sporkmonger.com'
should not match anything when extracting values using the incorrect opt pattern 'http://example.com/?email={-opt|bogus@bogus.com|test}'
should not match anything when extracting values using the incorrect neg pattern 'http://example.com/?email={-neg|bogus@bogus.com|test}'
should indicate a match when extracting values using the opt pattern 'http://example.com/?email={-opt|bob@sporkmonger.com|test}'
should indicate a match when extracting values using the neg pattern 'http://example.com/?email={-neg|bob@sporkmonger.com|test}'
Addressable::URI when parsed from 'http://example.com/?email='
should indicate a match when extracting values using the opt pattern 'http://example.com/?email={-opt|bob@sporkmonger.com|test}'
should indicate a match when extracting values using the neg pattern 'http://example.com/?email={-neg|bob@sporkmonger.com|test}'
Addressable::URI when parsed from 'http://example.com/a/b/c/?one=1&two=2#foo'
should have the correct mapping when extracting values using the pattern 'http://{host}/{-suffix|/|segments}?{-join|&|one,two}#{fragment}'
should not match when extracting values using the pattern 'http://{host}/{-suffix|/|segments}?{-join|&|one}#{fragment}'
should not match when extracting values using the pattern 'http://{host}/{-suffix|/|segments}?{-join|&|bogus}#{fragment}'
should not match when extracting values using the pattern 'http://{host}/{-suffix|/|segments}?{-join|&|one,bogus}#{fragment}'
should not match when extracting values using the pattern 'http://{host}/{-suffix|/|segments}?{-join|&|one,two,bogus}#{fragment}'
Addressable::URI when given a pattern with bogus operators
should raise an InvalidTemplateOperatorError
should raise an InvalidTemplateOperatorError
should raise an InvalidTemplateOperatorError
should raise an InvalidTemplateOperatorError
Addressable::URI when given a mapping that contains an Array
should result in 'http://example.com/search/an+example+search+query/' when used to expand 'http://example.com/search/{-list|+|query}/'
should result in 'http://example.com/search/an+example+search+query/' when used to expand 'http://example.com/search/{-list|+|query}/' with a NoOpProcessor
Addressable::URI when given an empty mapping
should result in 'http://example.com/search/' when used to expand 'http://example.com/search/{-list|+|query}'
should result in 'http://example.com' when used to expand 'http://example.com{-prefix|/|foo}'
should result in 'http://example.com' when used to expand 'http://example.com{-suffix|/|foo}'
Addressable::URI when given the template pattern 'http://example.com/search/{query}/' to be processed with the ExampleProcessor
should expand to 'http://example.com/search/an+example+search+query/' with a mapping of {"query" => "an example search query"}
should raise an error with a mapping of {"query" => "invalid!"}
Addressable::URI when given the mapping supplied in Section 3.3.1 of the URI Template draft v 01
should result in 'http://example.org/page1#fred' when used to expand 'http://example.org/page1#{a}'
should result in 'http://example.org/fred/barney/' when used to expand 'http://example.org/{a}/{b}/'
should result in 'http://example.org/fredbarney/' when used to expand 'http://example.org/{a}{b}/'
should result in 'http://example.com/order/cheeseburger/cheeseburger/cheeseburger/' when used to expand 'http://example.com/order/{c}/{c}/{c}/'
should result in 'http://example.org/one%20two%20three' when used to expand 'http://example.org/{d}'
should result in 'http://example.org/20%25%20tricky' when used to expand 'http://example.org/{e}'
should result in 'http://example.com//' when used to expand 'http://example.com/{f}/'
should result in 'https://this-is-spinal-tap.example.org?date=&option=fred' when used to expand '{scheme}://{20}.example.org?date={wilma}&option={a}'
should result in 'http://example.org?quote%3Dto%2Bbe%2Bor%2Bnot%2Bto%2Bbe' when used to expand 'http://example.org?{p}'
should result in 'http://example.com/hullo%23world' when used to expand 'http://example.com/{q}'
Addressable::URI when given the mapping supplied in Section 4.5 of the URI Template draft v 03
should result in 'http://example.org/?q=fred' when used to expand 'http://example.org/?q={bar}'
should result in '/' when used to expand '/{xyzzy}'
should result in 'http://example.org/?foo=%CE%8E&bar=fred&baz=10%2C20%2C30' when used to expand 'http://example.org/?{-join|&|foo,bar,xyzzy,baz}'
should result in 'http://example.org/?d=10,20,30' when used to expand 'http://example.org/?d={-list|,|qux}'
should result in 'http://example.org/?d=10&d=20&d=30' when used to expand 'http://example.org/?d={-list|&d=|qux}'
should result in 'http://example.org/fredfred/a%2Fb%2Fc' when used to expand 'http://example.org/{bar}{bar}/{garply}'
should result in 'http://example.org/fred/fred//wilma' when used to expand 'http://example.org/{bar}{-prefix|/|fred}'
should result in ':%E1%B9%A1:%E1%B9%A1:' when used to expand '{-neg|:|corge}{-suffix|:|plugh}'
should result in '../ben%20%26%20jerrys/' when used to expand '../{waldo}/'
should result in 'telnet:192.0.2.16:80' when used to expand 'telnet:192.0.2.16{-opt|:80|grault}'
should result in ':200:' when used to expand ':{1-a_b.c}:'
Addressable::URI when given a mapping that contains a template-var within a value
should result in 'http://example.com/%7Bb%7D/barney/' when used to expand 'http://example.com/{a}/{b}/'
should result in 'http://example.com//%7Bb%7D/' when used to expand 'http://example.com/{-opt|foo|foo}/{a}/'
should result in 'http://example.com//%7Bb%7D/' when used to expand 'http://example.com/{-neg|foo|b}/{a}/'
should result in 'http://example.com//barney/%7Bb%7D/' when used to expand 'http://example.com/{-prefix|/|b}/{a}/'
should result in 'http://example.com/barney//%7Bb%7D/' when used to expand 'http://example.com/{-suffix|/|b}/{a}/'
should result in 'http://example.com/%7Bb%7D/?b=barney&c=42' when used to expand 'http://example.com/{a}/?{-join|&|b,c=42}'
should result in 'http://example.com/42/?b=barney' when used to expand 'http://example.com/{c=42}/?{-join|&|b}'
Addressable::URI when given a single variable mapping
should result in 'fred' when used to expand '{foo}'
should result in 'wilma' when used to expand '{bar=wilma}'
should result in '' when used to expand '{baz}'
Addressable::URI when given a simple mapping
should result in 'foo=fred&bar=barney&baz=' when used to expand '{-join|&|foo,bar,baz,qux}'
should result in 'bar=barney' when used to expand '{-join|&|bar}'
should result in '' when used to expand '{-join|&|qux}'
Addressable::URI extracting defaults from a pattern
should extract default value
Addressable::URI when given a mapping with symbol keys
should result in 'fred' when used to expand '{foo}'
Addressable::URI when given a mapping with bogus keys
should raise an error
Addressable::URI when given a mapping with numeric values
should result in 'fred' when used to expand '{foo}'
Addressable::URI when given a mapping containing values that are already percent-encoded
should result in 'http://example.com/%257Bb%257D/' when used to expand 'http://example.com/{a}/'
Addressable::URI when given a pattern with bogus operators
should raise an InvalidTemplateOperatorError
should raise an InvalidTemplateOperatorError
should raise an InvalidTemplateOperatorError
should raise an InvalidTemplateOperatorError
should raise an InvalidTemplateOperatorError
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
should raise an error if the template is expanded with bogus values
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
should produce the correct result when fully expanded
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
should produce the correct result when fully expanded
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
should produce the correct result when fully expanded
should produce the correct pattern
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
should produce the correct result when fully expanded
should produce the correct pattern
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
should produce the correct result when fully expanded
should produce the correct pattern
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
should produce the correct result when fully expanded
should produce the correct pattern
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
should produce the correct result when fully expanded
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
should produce the correct result when fully expanded
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
Addressable::Template with a partially expanded template
should raise an error when partially expanding a bogus operator
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
should produce the correct result when fully expanded
should produce the correct result when fully expanded
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
should produce the correct result when fully expanded
Addressable::Template with a partially expanded template
should produce the same result when fully expanded
should produce the correct result when fully expanded
Addressable::Template with a partially expanded template
should raise an error when partially expanding a bogus operator
Addressable::Template with a partially expanded template
should raise an error when partially expanding a bogus operator
Addressable::URI when created with a non-numeric port number
should raise an error
Addressable::URI when created with a non-string scheme
should raise an error
Addressable::URI when created with a non-string user
should raise an error
Addressable::URI when created with a non-string password
should raise an error
Addressable::URI when created with a non-string userinfo
should raise an error
Addressable::URI when created with a non-string host
should raise an error
Addressable::URI when created with a non-string authority
should raise an error
Addressable::URI when created with a non-string authority
should raise an error
Addressable::URI when created with a non-string path
should raise an error
Addressable::URI when created with a non-string query
should raise an error
Addressable::URI when created with a non-string fragment
should raise an error
Addressable::URI when created with a scheme but no hierarchical segment
should raise an error
Addressable::URI when created from nil components
should have a nil site value
should have an empty path
should be an empty uri
should raise an error if the scheme is set to whitespace
should raise an error if the scheme is set to all digits
should raise an error if set into an invalid state
should raise an error if set into an invalid state
should raise an error if set into an invalid state
should raise an error if set into an invalid state
Addressable::URI when frozen
returns nil for #scheme
returns nil for #normalized_scheme
returns nil for #user
returns nil for #normalized_user
returns nil for #password
returns nil for #normalized_password
returns nil for #userinfo
returns nil for #normalized_userinfo
returns nil for #host
returns nil for #normalized_host
returns nil for #authority
returns nil for #normalized_authority
returns nil for #port
returns nil for #normalized_port
returns nil for #site
returns nil for #normalized_site
returns '' for #path
returns '' for #normalized_path
returns nil for #query
returns nil for #normalized_query
returns nil for #fragment
returns nil for #normalized_fragment
returns #hash
returns #to_s
Addressable::URI when created from string components
should have a site value of 'http://example.com'
should be equal to the equivalent parsed URI
should raise an error if invalid components omitted
Addressable::URI when created with a nil host but non-nil authority components
should raise an error
Addressable::URI when created with both an authority and a user
should raise an error
Addressable::URI when created with an authority and no port
should not infer a port
should have a site value of '//user@example.com'
should have a 'null' origin
Addressable::URI when created with both a userinfo and a user
should raise an error
Addressable::URI when created with a path that hasn't been prefixed with a '/' but a host specified
should prefix a '/' to the path
should have a site value of 'http://example.com'
should have an origin of 'http://example.com
Addressable::URI when created with a path that hasn't been prefixed with a '/' but no host specified
should not prefix a '/' to the path
should have a site value of 'http:'
should have a 'null' origin
Addressable::URI when parsed from an Addressable::URI object
should not have unexpected side-effects
should not have unexpected side-effects
Addressable::URI when parsed from something that looks like a URI object
should parse without error
Addressable::URI when parsed from ''
should have no scheme
should not be considered to be ip-based
should have a path of ''
should have a request URI of '/'
should be considered relative
should be considered to be in normal form
should have a 'null' origin
Addressable::URI when parsed from 'ftp://ftp.is.co.za/rfc/rfc1808.txt'
should use the 'ftp' scheme
should be considered to be ip-based
should have a host of 'ftp.is.co.za'
should have a path of '/rfc/rfc1808.txt'
should not have a request URI
should be considered to be in normal form
should have an origin of 'ftp://ftp.is.co.za'
Addressable::URI when parsed from 'http://www.ietf.org/rfc/rfc2396.txt'
should use the 'http' scheme
should be considered to be ip-based
should have a host of 'www.ietf.org'
should have a path of '/rfc/rfc2396.txt'
should have a request URI of '/rfc/rfc2396.txt'
should be considered to be in normal form
should correctly omit components
should correctly omit components destructively
should have an origin of 'http://www.ietf.org'
Addressable::URI when parsed from 'ldap://[2001:db8::7]/c=GB?objectClass?one'
should use the 'ldap' scheme
should be considered to be ip-based
should have a host of '[2001:db8::7]'
should have a path of '/c=GB'
should not have a request URI
should not allow request URI assignment
should have a query of 'objectClass?one'
should be considered to be in normal form
should correctly omit components
should correctly omit components destructively
should raise an error if omission would create an invalid URI
should have an origin of 'ldap://[2001:db8::7]'
Addressable::URI when parsed from 'mailto:John.Doe@example.com'
should use the 'mailto' scheme
should not be considered to be ip-based
should have a path of 'John.Doe@example.com'
should not have a request URI
should be considered to be in normal form
should have a 'null' origin
Addressable::URI when parsed from 'news:comp.infosystems.www.servers.unix'
should use the 'news' scheme
should not be considered to be ip-based
should have a path of 'comp.infosystems.www.servers.unix'
should not have a request URI
should be considered to be in normal form
should have a 'null' origin
Addressable::URI when parsed from 'tel:+1-816-555-1212'
should use the 'tel' scheme
should not be considered to be ip-based
should have a path of '+1-816-555-1212'
should not have a request URI
should be considered to be in normal form
should have a 'null' origin
Addressable::URI when parsed from 'telnet://192.0.2.16:80/'
should use the 'telnet' scheme
should have a host of '192.0.2.16'
should have a port of '80'
should be considered to be ip-based
should have a path of '/'
should not have a request URI
should be considered to be in normal form
should have an origin of 'telnet://192.0.2.16:80'
Addressable::URI when parsed from 'urn:oasis:names:specification:docbook:dtd:xml:4.1.2'
should use the 'urn' scheme
should not be considered to be ip-based
should have a path of 'oasis:names:specification:docbook:dtd:xml:4.1.2'
should not have a request URI
should be considered to be in normal form
should have a 'null' origin
Addressable::URI when parsed from 'http://example.com'
when inspected, should have the correct URI
when inspected, should have the correct class name
when inspected, should have the correct object id
should use the 'http' scheme
should be considered to be ip-based
should have an authority segment of 'example.com'
should have a host of 'example.com'
should be considered ip-based
should have no username
should have no password
should use port 80
should not have a specified port
should have an empty path
should have no query string
should have a request URI of '/'
should have no fragment
should be considered absolute
should not be considered relative
should not be exactly equal to 42
should not be equal to 42
should not be roughly equal to 42
should be exactly equal to http://example.com
should be roughly equal to http://example.com/
should be roughly equal to the string 'http://example.com/'
should not be roughly equal to the string 'http://example.com:bogus/'
should result in itself when joined with itself
should be equivalent to http://EXAMPLE.com
should be equivalent to http://EXAMPLE.com:80/
should have the same hash as http://example.com
should have the same hash as http://EXAMPLE.com after assignment
should have a different hash from http://EXAMPLE.com
should be equivalent to http://example.com/
should be equivalent to http://example.com:/
should be equivalent to http://example.com:80/
should be equivalent to http://EXAMPLE.COM/
should have a route of '/path/' to 'http://example.com/path/'
should have a route of '/' from 'http://example.com/path/'
should have a route of '#' to 'http://example.com/'
should have a route of 'http://elsewhere.com/' to 'http://elsewhere.com/'
when joined with 'relative/path' should be 'http://example.com/relative/path'
when joined with a bogus object a TypeError should be raised
should have the correct username after assignment
should have the correct username after assignment
should have the correct password after assignment
should have the correct password after assignment
should have the correct user/pass after repeated assignment
should have the correct user/pass after userinfo assignment
should correctly convert to a hash
should be identical to its duplicate
should have an origin of 'http://example.com'
Addressable::URI when parsed from 'http://www.w3.org/pub/WWW/TheProject.html'
should have the correct request URI
should have the correct request URI after assignment
should have the correct request URI after assignment
should raise an error if the site value is set to something bogus
should raise an error if the request URI is set to something bogus
should correctly convert to a hash
should have an origin of 'http://www.w3.org'
Addressable::URI when parsed from 'http://example.com/'
should be equivalent to http://example.com
should be equivalent to HTTP://example.com/
should be equivalent to http://example.com:/
should be equivalent to http://example.com:80/
should be equivalent to http://Example.com/
should have the correct username after assignment
should have the correct password after assignment
should have a request URI of '/'
should correctly convert to a hash
should be identical to its duplicate
should have the same hash as its duplicate
should have a different hash from its equivalent String value
should have the same hash as an equal URI
should be equivalent to http://EXAMPLE.com
should be equivalent to http://EXAMPLE.com:80/
should have the same hash as http://example.com/
should have the same hash as http://example.com after assignment
should have the same hash as http://example.com/? after assignment
should have the same hash as http://example.com/? after assignment
should have the same hash as http://example.com/# after assignment
should have a different hash from http://example.com
should have an origin of 'http://example.com'
Addressable::URI when parsed from 'http://@example.com/'
should be equivalent to http://example.com
should correctly convert to a hash
should be identical to its duplicate
should have an origin of 'http://example.com'
Addressable::URI when parsed from 'http://example.com./'
should be equivalent to http://example.com
should not be considered to be in normal form
should be identical to its duplicate
should have an origin of 'http://example.com'
Addressable::URI when parsed from 'http://:@example.com/'
should be equivalent to http://example.com
should correctly convert to a hash
should be identical to its duplicate
should have an origin of 'http://example.com'
Addressable::URI when parsed from 'http://example.com/~smith/'
should be equivalent to http://example.com/%7Esmith/
should be equivalent to http://example.com/%7esmith/
should be identical to its duplicate
Addressable::URI when parsed from 'http://example.com/%E8'
should not raise an exception when normalized
should be considered to be in normal form
should not change if encoded with the normalizing algorithm
Addressable::URI when parsed from 'http://example.com/path%2Fsegment/'
should be considered to be in normal form
should be equal to 'http://example.com/path%2Fsegment/'
should not be equal to 'http://example.com/path/segment/'
should not be equal to 'http://example.com/path/segment/'
Addressable::URI when parsed from 'http://example.com/?%F6'
should not raise an exception when normalized
should be considered to be in normal form
should not change if encoded with the normalizing algorithm
Addressable::URI when parsed from 'http://example.com/#%F6'
should not raise an exception when normalized
should be considered to be in normal form
should not change if encoded with the normalizing algorithm
Addressable::URI when parsed from 'http://example.com/%C3%87'
should be equivalent to 'http://example.com/C%CC%A7'
should not change if encoded with the normalizing algorithm
should raise an error if encoding with an unexpected return type
if percent encoded should be 'http://example.com/C%25CC%25A7'
if percent encoded should be 'http://example.com/C%25CC%25A7'
should raise an error if encoding with an unexpected return type
should be identical to its duplicate
Addressable::URI when parsed from 'http://example.com/?q=string'
should use the 'http' scheme
should have an authority segment of 'example.com'
should have a host of 'example.com'
should have no username
should have no password
should use port 80
should have a path of '/'
should have a query string of 'q=string'
should have no fragment
should be considered absolute
should not be considered relative
should be considered to be in normal form
should be identical to its duplicate
Addressable::URI when parsed from 'http://example.com:80/'
should use the 'http' scheme
should have an authority segment of 'example.com:80'
should have a host of 'example.com'
should have no username
should have no password
should use port 80
should have a path of '/'
should have no query string
should have no fragment
should be considered absolute
should not be considered relative
should be exactly equal to http://example.com:80/
should be roughly equal to http://example.com/
should be roughly equal to the string 'http://example.com/'
should not be roughly equal to the string 'http://example.com:bogus/'
should result in itself when joined with itself
should be equal to http://example.com/
should be equal to http://example.com:/
should be equal to http://example.com:80/
should be equal to http://EXAMPLE.COM/
should correctly convert to a hash
should be identical to its duplicate
should have an origin of 'http://example.com'
Addressable::URI when parsed from 'http://example.com:8080/'
should use the 'http' scheme
should have an authority segment of 'example.com:8080'
should have a host of 'example.com'
should have no username
should have no password
should use port 8080
should have a path of '/'
should have no query string
should have no fragment
should be considered absolute
should not be considered relative
should be exactly equal to http://example.com:8080/
should have a route of 'http://example.com:8080/' from 'http://example.com/path/to/'
should have a route of 'http://example.com:8080/' from 'http://example.com:80/path/to/'
should have a route of '/' from 'http://example.com:8080/path/to/'
should have a route of 'http://example.com:8080/' from 'http://user:pass@example.com/path/to/'
should correctly convert to a hash
should be identical to its duplicate
should have an origin of 'http://example.com:8080'
Addressable::URI when parsed from 'http://example.com:%38%30/'
should have the correct port
should not be considered to be in normal form
should normalize to 'http://example.com/'
should have an origin of 'http://example.com'
Addressable::URI when parsed from 'http://example.com/..'
should have the correct port
should not be considered to be in normal form
should normalize to 'http://example.com/'
Addressable::URI when parsed from 'http://example.com/../..'
should have the correct port
should not be considered to be in normal form
should normalize to 'http://example.com/'
Addressable::URI when parsed from 'http://example.com/path(/..'
should have the correct port
should not be considered to be in normal form
should normalize to 'http://example.com/'
Addressable::URI when parsed from 'http://example.com/(path)/..'
should have the correct port
should not be considered to be in normal form
should normalize to 'http://example.com/'
Addressable::URI when parsed from 'http://example.com/path(/../'
should have the correct port
should not be considered to be in normal form
should normalize to 'http://example.com/'
Addressable::URI when parsed from 'http://example.com/(path)/../'
should have the correct port
should not be considered to be in normal form
should normalize to 'http://example.com/'
Addressable::URI when parsed from 'http://example.com/path/to/resource/'
should use the 'http' scheme
should have an authority segment of 'example.com'
should have a host of 'example.com'
should have no username
should have no password
should use port 80
should have a path of '/path/to/resource/'
should have no query string
should have no fragment
should be considered absolute
should not be considered relative
should be exactly equal to http://example.com:8080/
should have a route of 'resource/' from 'http://example.com/path/to/'
should have a route of 'resource/' from 'http://example.com:80/path/to/'
should have a route of 'http://example.com/path/to/' from 'http://example.com:8080/path/to/'
should have a route of 'http://example.com/path/to/' from 'http://user:pass@example.com/path/to/'
should have a route of '/path/to/resource/' from 'http://example.com/to/resource/'
should correctly convert to a hash
should be identical to its duplicate
Addressable::URI when parsed from 'relative/path/to/resource'
should not have a scheme
should not be considered ip-based
should not have an authority segment
should not have a host
should have no username
should have no password
should not have a port
should have a path of 'relative/path/to/resource'
should have no query string
should have no fragment
should not be considered absolute
should be considered relative
should raise an error if routing is attempted
when joined with 'another/relative/path' should be 'relative/path/to/another/relative/path'
should be identical to its duplicate
Addressable::URI when parsed from 'relative_path_with_no_slashes'
should not have a scheme
should not be considered ip-based
should not have an authority segment
should not have a host
should have no username
should have no password
should not have a port
should have a path of 'relative_path_with_no_slashes'
should have no query string
should have no fragment
should not be considered absolute
should be considered relative
when joined with 'another_relative_path' should be 'another_relative_path'
Addressable::URI when parsed from 'http://example.com/file.txt'
should have a scheme of 'http'
should have an authority segment of 'example.com'
should have a host of 'example.com'
should have no username
should have no password
should use port 80
should have a path of '/file.txt'
should have a basename of 'file.txt'
should have an extname of '.txt'
should have no query string
should have no fragment
Addressable::URI when parsed from 'http://example.com/file.txt;parameter'
should have a scheme of 'http'
should have an authority segment of 'example.com'
should have a host of 'example.com'
should have no username
should have no password
should use port 80
should have a path of '/file.txt;parameter'
should have a basename of 'file.txt'
should have an extname of '.txt'
should have no query string
should have no fragment
Addressable::URI when parsed from 'http://example.com/file.txt;x=y'
should have a scheme of 'http'
should have a scheme of 'http'
should have an authority segment of 'example.com'
should have a host of 'example.com'
should have no username
should have no password
should use port 80
should have a path of '/file.txt;x=y'
should have an extname of '.txt'
should have no query string
should have no fragment
should be considered to be in normal form
Addressable::URI when parsed from 'svn+ssh://developername@rubyforge.org/var/svn/project'
should have a scheme of 'svn+ssh'
should be considered to be ip-based
should have a path of '/var/svn/project'
should have a username of 'developername'
should have no password
should be considered to be in normal form
Addressable::URI when parsed from 'ssh+svn://developername@RUBYFORGE.ORG/var/svn/project'
should have a scheme of 'ssh+svn'
should have a normalized scheme of 'svn+ssh'
should have a normalized site of 'svn+ssh'
should not be considered to be ip-based
should have a path of '/var/svn/project'
should have a username of 'developername'
should have no password
should not be considered to be in normal form
Addressable::URI when parsed from 'mailto:user@example.com'
should have a scheme of 'mailto'
should not be considered to be ip-based
should have a path of 'user@example.com'
should have no user
should be considered to be in normal form
Addressable::URI when parsed from 'tag:example.com,2006-08-18:/path/to/something'
should have a scheme of 'tag'
should be considered to be ip-based
should have a path of 'example.com,2006-08-18:/path/to/something'
should have no user
should be considered to be in normal form
should have a 'null' origin
Addressable::URI when parsed from 'http://example.com/x;y/'
should be considered to be in normal form
Addressable::URI when parsed from 'http://example.com/?x=1&y=2'
should be considered to be in normal form
Addressable::URI when parsed from 'view-source:http://example.com/'
should have a scheme of 'view-source'
should have a path of 'http://example.com/'
should be considered to be in normal form
should have a 'null' origin
Addressable::URI when parsed from 'http://user:pass@example.com/path/to/resource?query=x#fragment'
should use the 'http' scheme
should have an authority segment of 'user:pass@example.com'
should have a username of 'user'
should have a password of 'pass'
should have a host of 'example.com'
should use port 80
should have a path of '/path/to/resource'
should have a query string of 'query=x'
should have a fragment of 'fragment'
should be considered to be in normal form
should have a route of '/path/' to 'http://user:pass@example.com/path/'
should have a route of '/path/to/resource?query=x#fragment' from 'http://user:pass@example.com/path/'
should have a route of '?query=x#fragment' from 'http://user:pass@example.com/path/to/resource'
should have a route of '#fragment' from 'http://user:pass@example.com/path/to/resource?query=x'
should have a route of '#fragment' from 'http://user:pass@example.com/path/to/resource?query=x#fragment'
should have a route of 'http://elsewhere.com/' to 'http://elsewhere.com/'
should have a route of 'http://user:pass@example.com/path/to/resource?query=x#fragment' from 'http://example.com/path/to/'
should have the correct scheme after assignment
should have the correct site segment after assignment
should have the correct authority segment after assignment
should have the correct userinfo segment after assignment
should have the correct username after assignment
should have the correct password after assignment
should have the correct host after assignment
should have the correct port after assignment
should have the correct path after assignment
should have the correct scheme and authority after nil assignment
should have the correct scheme and authority after assignment
should have the correct path after nil assignment
should have the correct query string after assignment
should have the correct query string after hash assignment
should have the correct query string after flag hash assignment
should raise an error if query values are set to a bogus type
should have the correct fragment after assignment
should have the correct values after a merge
should have the correct values after a merge
should have the correct values after a merge
should have the correct values after a merge
should have the correct values after a merge
should have the correct values after a merge
should have the correct values after a merge
should have the correct values after a destructive merge
should fail to merge with bogus values
should fail to merge with bogus values
should fail to merge with bogus parameters
should fail to merge with bogus parameters
should fail to merge with both authority and subcomponents
should fail to merge with both userinfo and subcomponents
should be identical to its duplicate
should have an origin of 'http://example.com'
Addressable::URI when parsed from 'http://example.com/search?q=Q%26A'
should have a query of 'q=Q%26A'
should have query_values of {'q' => 'Q&A'}
should normalize to the original uri (with the ampersand properly percent-encoded)
Addressable::URI when parsed from 'http://example.com/?&x=b'
should have a query of '&x=b'
should have query_values of {'x' => 'b'}
Addressable::URI when parsed from 'http://example.com/?&&x=b'
should have a query of '&&x=b'
should have query_values of {'x' => 'b'}
Addressable::URI when parsed from 'http://example.com/?q=a&&x=b'
should have a query of 'q=a&&x=b'
should have query_values of {'q' => 'a, 'x' => 'b'}
Addressable::URI when parsed from 'http://example.com/?q&&x=b'
should have a query of 'q&&x=b'
should have query_values of {'q' => true, 'x' => 'b'}
Addressable::URI when parsed from 'http://example.com/?q=a+b'
should have a query of 'q=a+b'
should have query_values of {'q' => 'a b'}
Addressable::URI when parsed from 'http://example.com/?q=a%2bb'
should have a query of 'q=a+b'
should have query_values of {'q' => 'a+b'}
Addressable::URI when parsed from 'http://example.com/?q='
should have a query of 'q='
should have query_values of {'q' => ''}
Addressable::URI when parsed from 'http://user@example.com'
should use the 'http' scheme
should have a username of 'user'
should have no password
should have a userinfo of 'user'
should have a normalized userinfo of 'user'
should have a host of 'example.com'
should use port 80
should have the correct username after assignment
should have the correct password after assignment
should have the correct userinfo segment after assignment
should have the correct userinfo segment after nil assignment
should have the correct authority segment after assignment
should raise an error after nil assignment of authority segment
Addressable::URI when parsed from 'http://user:@example.com'
should use the 'http' scheme
should have a username of 'user'
should have a password of ''
should have a normalized userinfo of 'user:'
should have a host of 'example.com'
should use port 80
should have the correct username after assignment
should have the correct password after assignment
should have the correct authority segment after assignment
Addressable::URI when parsed from 'http://:pass@example.com'
should use the 'http' scheme
should have a username of ''
should have a password of 'pass'
should have a userinfo of ':pass'
should have a normalized userinfo of ':pass'
should have a host of 'example.com'
should use port 80
should have the correct username after assignment
should have the correct password after assignment
should have the correct authority segment after assignment
Addressable::URI when parsed from 'http://:@example.com'
should use the 'http' scheme
should have a username of ''
should have a password of ''
should have a normalized userinfo of nil
should have a host of 'example.com'
should use port 80
should have the correct username after assignment
should have the correct password after assignment
should have the correct authority segment after assignment
Addressable::URI when parsed from '#example'
should be considered relative
should have a host of nil
should have a site of nil
should have a normalized_site of nil
should have a path of ''
should have a query string of nil
should have a fragment of 'example'
Addressable::URI when parsed from the network-path reference '//example.com/'
should be considered relative
should have a host of 'example.com'
should have a path of '/'
should raise an error if routing is attempted
should have a 'null' origin
Addressable::URI when parsed from 'feed://http://example.com/'
should have a host of 'http'
should have a path of '//example.com/'
Addressable::URI when parsed from 'feed:http://example.com/'
should have a path of 'http://example.com/'
should normalize to 'http://example.com/'
should have a 'null' origin
Addressable::URI when parsed from 'example://a/b/c/%7Bfoo%7D'
should be equivalent to eXAMPLE://a/./b/../b/%63/%7bfoo%7d
should have an origin of 'example://a'
Addressable::URI when parsed from 'http://example.com/indirect/path/./to/../resource/'
should use the 'http' scheme
should have a host of 'example.com'
should use port 80
should have a path of '/indirect/path/./to/../resource/'
should have a normalized path of '/indirect/path/resource/'
Addressable::URI when parsed from 'http://under_score.example.com/'
should not cause an error
Addressable::URI when parsed from './this:that'
should be considered relative
should have no scheme
should have a 'null' origin
Addressable::URI when parsed from 'this:that'
should be considered absolute
should have a scheme of 'this'
should have a 'null' origin
Addressable::URI when parsed from '?'
should have the correct subscript notation query values
should have the correct dot notation query values
should have the correct flat notation query values
should have a 'null' origin
Addressable::URI when parsed from '?one=1&two=2&three=3'
should have the correct query values
should raise an error for invalid query value notations
should have the correct flat array notation query values
should have a 'null' origin
Addressable::URI when parsed from '?one=1=uno&two=2=dos'
should have the correct query values
should have the correct flat array notation query values
Addressable::URI when parsed from '?one[two][three]=four'
should have the correct query values
should have the correct flat notation query values
should have the correct flat array notation query values
Addressable::URI when parsed from '?one.two.three=four'
should have the correct dot notation query values
should have the correct flat notation query values
should have the correct flat array notation query values
Addressable::URI when parsed from '?one[two][three]=four&one[two][five]=six'
should have the correct dot notation query values
should have the correct flat notation query values
should have the correct flat array notation query values
Addressable::URI when parsed from '?one.two.three=four&one.two.five=six'
should have the correct dot notation query values
should have the correct flat notation query values
should have the correct flat array notation query values
Addressable::URI when parsed from '?one=two&one=three'
should have correct flat_array notation query values
Addressable::URI when parsed from '?one[two][three][]=four&one[two][three][]=five'
should have the correct subscript notation query values
should raise an error if a key is repeated in the flat notation
should not raise an error if a key is repeated in the flat array notation
Addressable::URI when parsed from '?one[two][three][0]=four&one[two][three][1]=five'
should have the correct subscript notation query values
Addressable::URI when parsed from '?one[two][three][1]=four&one[two][three][0]=five'
should have the correct subscript notation query values
Addressable::URI when parsed from '?one[two][three][2]=four&one[two][three][1]=five'
should have the correct subscript notation query values
Addressable::URI when parsed from 'http://www.詹姆斯.com/'
should be equivalent to 'http://www.xn--8ws00zhy3a.com/'
should not have domain name encoded during normalization
should have an origin of 'http://www.xn--8ws00zhy3a.com'
Addressable::URI when parsed from 'http://www.詹姆斯.com/ some spaces /'
should be equivalent to 'http://www.xn--8ws00zhy3a.com/%20some%20spaces%20/'
should not have domain name encoded during normalization
should have an origin of 'http://www.xn--8ws00zhy3a.com'
Addressable::URI when parsed from 'http://www.xn--8ws00zhy3a.com/'
should be displayed as http://www.詹姆斯.com/
should properly force the encoding
should have an origin of 'http://www.xn--8ws00zhy3a.com'
Addressable::URI when parsed from 'http://www.詹姆斯.com/atomtests/iri/詹.html'
should normalize to http://www.xn--8ws00zhy3a.com/atomtests/iri/%E8%A9%B9.html
Addressable::URI when parsed from a percent-encoded IRI
should normalize to something sane
should have the correct origin
Addressable::URI with a base uri of 'http://a/b/c/d;p?q'
when joined with 'g:h' should resolve to g:h
when joined with 'g' should resolve to http://a/b/c/g
when joined with './g' should resolve to http://a/b/c/g
when joined with 'g/' should resolve to http://a/b/c/g/
when joined with '/g' should resolve to http://a/g
when joined with '//g' should resolve to http://g
when joined with '?y' should resolve to http://a/b/c/d;p?y
when joined with 'g?y' should resolve to http://a/b/c/g?y
when joined with '#s' should resolve to http://a/b/c/d;p?q#s
when joined with 'g#s' should resolve to http://a/b/c/g#s
when joined with 'g?y#s' should resolve to http://a/b/c/g?y#s
when joined with ';x' should resolve to http://a/b/c/;x
when joined with 'g;x' should resolve to http://a/b/c/g;x
when joined with 'g;x?y#s' should resolve to http://a/b/c/g;x?y#s
when joined with '' should resolve to http://a/b/c/d;p?q
when joined with '.' should resolve to http://a/b/c/
when joined with './' should resolve to http://a/b/c/
when joined with '..' should resolve to http://a/b/
when joined with '../' should resolve to http://a/b/
when joined with '../g' should resolve to http://a/b/g
when joined with '../..' should resolve to http://a/
when joined with '../../' should resolve to http://a/
when joined with '../../g' should resolve to http://a/g
when joined with '../../../g' should resolve to http://a/g
when joined with '../.././../g' should resolve to http://a/g
when joined with '../../../../g' should resolve to http://a/g
when joined with '/./g' should resolve to http://a/g
when joined with '/../g' should resolve to http://a/g
when joined with 'g.' should resolve to http://a/b/c/g.
when joined with '.g' should resolve to http://a/b/c/.g
when joined with 'g..' should resolve to http://a/b/c/g..
when joined with '..g' should resolve to http://a/b/c/..g
when joined with './../g' should resolve to http://a/b/g
when joined with './g/.' should resolve to http://a/b/c/g/
when joined with 'g/./h' should resolve to http://a/b/c/g/h
when joined with 'g/../h' should resolve to http://a/b/c/h
when joined with 'g;x=1/./y' should resolve to http://a/b/c/g;x=1/y
when joined with 'g;x=1/../y' should resolve to http://a/b/c/y
when joined with 'g?y/./x' should resolve to http://a/b/c/g?y/./x
when joined with 'g?y/../x' should resolve to http://a/b/c/g?y/../x
when joined with 'g#s/./x' should resolve to http://a/b/c/g#s/./x
when joined with 'g#s/../x' should resolve to http://a/b/c/g#s/../x
when joined with 'http:g' should resolve to http:g
when joined with '//example.com/' should resolve to http://example.com/
when joined with a bogus object a TypeError should be raised
Addressable::URI when converting the path 'relative/path/to/something'
should convert to 'relative/path/to/something'
should join with an absolute file path correctly
Addressable::URI when converting a bogus path
should raise a TypeError
Addressable::URI when given a UNIX root directory
should convert to 'file:///'
should have an origin of 'file://'
Addressable::URI when given a Windows root directory
should convert to 'file:///c:/'
should have an origin of 'file://'
Addressable::URI when given the path '/one/two/'
should convert to 'file:///one/two/'
should have an origin of 'file://'
Addressable::URI when given the path 'c:\windows\My Documents 100%20\foo.txt'
should convert to 'file:///c:/windows/My%20Documents%20100%20/foo.txt'
should have an origin of 'file://'
Addressable::URI when given the path 'file://c:\windows\My Documents 100%20\foo.txt'
should convert to 'file:///c:/windows/My%20Documents%20100%20/foo.txt'
should have an origin of 'file://'
Addressable::URI when given the path 'file:c:\windows\My Documents 100%20\foo.txt'
should convert to 'file:///c:/windows/My%20Documents%20100%20/foo.txt'
should have an origin of 'file://'
Addressable::URI when given the path 'file:/c:\windows\My Documents 100%20\foo.txt'
should convert to 'file:///c:/windows/My%20Documents%20100%20/foo.txt'
should have an origin of 'file://'
Addressable::URI when given the path 'file:///c|/windows/My%20Documents%20100%20/foo.txt'
should convert to 'file:///c:/windows/My%20Documents%20100%20/foo.txt'
should have an origin of 'file://'
Addressable::URI when given an http protocol URI
should not do any conversion at all
Addressable::URI when parsing a non-String object
should correctly parse anything with a 'to_str' method
should raise a TypeError for objects than cannot be converted
should correctly parse heuristically anything with a 'to_str' method
should raise a TypeError for objects than cannot be converted
Addressable::URI when form encoding a hash
should result in correct percent encoded sequence
should result in correct percent encoded sequence
should result in correct percent encoded sequence
should result in correctly encoded newlines
should result in a sorted percent encoded sequence
Addressable::URI when form encoding a non-Array object
should raise a TypeError for objects than cannot be converted
Addressable::URI when form unencoding a string
should result in correct values
should result in correct values
should result in correct values
should result in correct values
should result in correct values
should result in correct values
Addressable::URI when form unencoding a non-String object
should correctly parse anything with a 'to_str' method
should raise a TypeError for objects than cannot be converted
Addressable::URI when normalizing a non-String object
should correctly parse anything with a 'to_str' method
should raise a TypeError for objects than cannot be converted
should raise a TypeError for objects than cannot be converted
Addressable::URI when normalizing a path with an encoded slash
should result in correct percent encoded sequence
Addressable::URI when normalizing a partially encoded string
should result in correct percent encoded sequence
should result in correct percent encoded sequence
Addressable::URI when normalizing a unicode sequence
should result in correct percent encoded sequence
should result in correct percent encoded sequence
Addressable::URI when normalizing a multibyte string
should result in correct percent encoded sequence
should result in correct percent encoded sequence
Addressable::URI when encoding a multibyte string
should result in correct percent encoded sequence
should result in correct percent encoded sequence
Addressable::URI when form encoding a multibyte string
should result in correct percent encoded sequence
Addressable::URI when encoding a string with ASCII chars 0-15
should result in correct percent encoded sequence
should result in correct percent encoded sequence
Addressable::URI when unencoding a multibyte string
should result in correct percent encoded sequence
should result in correct percent encoded sequence as a URI
Addressable::URI when unencoding a bogus object
should raise a TypeError
should raise a TypeError
Addressable::URI when encoding a bogus object
should raise a TypeError
should raise a TypeError
should raise a TypeError
should raise a TypeError
Addressable::URI when given the input 'http://example.com/'
should heuristically parse to 'http://example.com/'
should not raise error when frozen
Addressable::URI when given the input 'https://example.com/'
should heuristically parse to 'https://example.com/'
Addressable::URI when given the input 'http:example.com/'
should heuristically parse to 'http://example.com/'
should heuristically parse to 'http://example.com/' even with a scheme hint of 'ftp'
Addressable::URI when given the input 'https:example.com/'
should heuristically parse to 'https://example.com/'
should heuristically parse to 'https://example.com/' even with a scheme hint of 'ftp'
Addressable::URI when given the input 'http://example.com/example.com/'
should heuristically parse to 'http://example.com/example.com/'
Addressable::URI when given the input '/path/to/resource'
should heuristically parse to '/path/to/resource'
Addressable::URI when given the input 'relative/path/to/resource'
should heuristically parse to 'relative/path/to/resource'
Addressable::URI when given the input 'example.com'
should heuristically parse to 'http://example.com'
Addressable::URI when given the input 'example.com' and a scheme hint of 'ftp'
should heuristically parse to 'http://example.com'
Addressable::URI when given the input 'example.com:21' and a scheme hint of 'ftp'
should heuristically parse to 'http://example.com:21'
Addressable::URI when given the input 'example.com/path/to/resource'
should heuristically parse to 'http://example.com/path/to/resource'
Addressable::URI when given the input 'http:///example.com'
should heuristically parse to 'http://example.com'
Addressable::URI when given the input 'feed:///example.com'
should heuristically parse to 'feed://example.com'
Addressable::URI when given the input 'file://path/to/resource/'
should heuristically parse to 'file:///path/to/resource/'
Addressable::URI when given the input 'feed://http://example.com'
should heuristically parse to 'feed:http://example.com'
Addressable::URI when assigning query values
should correctly assign {:a => 'a', :b => ['c', 'd', 'e']}
should correctly assign {'a' => {'b' => [ 'c']}}
should correctly assign {:b => '2', :a => {:c => '1'}}
should correctly assign {:a => 'a', :b => [{:c => 'c', :d => 'd'}, {:e => 'e', :f => 'f'}]}
should correctly assign {:a => 'a', :b => [{:c => true, :d => 'd'}, {:e => 'e', :f => 'f'}]}
should correctly assign {:a => 'a', :b => {:c => true, :d => 'd'}}
should correctly assign {:a => 'a', :b => {:c => true, :d => 'd'}}
should correctly assign {:a => 1, :b => 1.5}
should correctly assign {:z => 1, :f => [2, {999.1 => [3,'4']}, ['h', 'i']], :a => {:b => ['c', 'd'], :e => true, :y => 0.5}}
should correctly assign {}
should correctly assign nil
should correctly sort {'ab' => 'c', :ab => 'a', :a => 'x'}
should correctly assign [['b', 'c'], ['b', 'a'], ['a', 'a']]
should preserve query string order
Addressable::URI when assigning path values
should correctly assign paths containing colons
should correctly assign paths containing colons
should correctly assign paths containing colons
should not allow relative paths to be assigned on absolute URIs
should not allow relative paths to be assigned on absolute URIs
should not allow relative paths to be assigned on absolute URIs