Sha256: a4aa1b2c3c3acbf91c1df2bc56d2ab80363b38bdf48c33312ef9e041291e8263
Contents?: true
Size: 973 Bytes
Versions: 1
Compression:
Stored size: 973 Bytes
Contents
require 'spec_helper' describe Earl::URL do it 'should be able to change the scheme' do url = Earl::URL.new 'http://foo.com' url.scheme = 'https' url.to_s.should eq( 'https://foo.com' ) end it 'should be able to add a scheme' do url = Earl::URL.new 'foo.com' url.scheme = 'http' url.to_s.should eq( 'http://foo.com' ) end it 'should be able to remove the scheme' do url = Earl::URL.new 'http://foo.com' url.scheme = nil url.to_s.should eq( 'foo.com' ) end it 'should be able to change the subdomain' do url = Earl::URL.new 'foo.bar.com' url.subdomain = 'baz' url.to_s.should eq( 'baz.bar.com' ) end it 'should be able to add a subdomain' do url = Earl::URL.new 'foo.com' url.subdomain = 'bar' url.to_s.should eq( 'bar.foo.com' ) end it 'should be able to remove the subdomain' do url = Earl::URL.new 'foo.bar.com' url.subdomain = nil url.to_s.should eq( 'bar.com' ) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
earl-0.1.0 | spec/earl/url_spec.rb |