Sha256: 039cad2990f3bbc69eb14e2e4820ac2f4db1e273b86531c8f1354fd3134b8762

Contents?: true

Size: 624 Bytes

Versions: 18

Compression:

Stored size: 624 Bytes

Contents

require File.join(File.dirname(__FILE__),'../../spec_helper')

describe IMW::Schemes::HTTP do

  describe "finding its effective basename" do
    it "should use the real basename when present" do
      IMW.open('http://www.google.com/foobar').effective_basename.should == 'foobar'
    end

    it "should use '_index' when at the root (without a slash)" do
      IMW.open('http://www.google.com').effective_basename.should == '_index'
    end

    it "should use '_index' when at the root (even when a slash is given)" do
      IMW.open('http://www.google.com/').effective_basename.should == '_index'
    end
    
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
imw-0.2.18 spec/imw/schemes/http_spec.rb
imw-0.2.17 spec/imw/schemes/http_spec.rb
imw-0.2.16 spec/imw/schemes/http_spec.rb
imw-0.2.15 spec/imw/schemes/http_spec.rb
imw-0.2.14 spec/imw/schemes/http_spec.rb
imw-0.2.13 spec/imw/schemes/http_spec.rb
imw-0.2.12 spec/imw/schemes/http_spec.rb
imw-0.2.11 spec/imw/schemes/http_spec.rb
imw-0.2.10 spec/imw/schemes/http_spec.rb
imw-0.2.9 spec/imw/schemes/http_spec.rb
imw-0.2.8 spec/imw/schemes/http_spec.rb
imw-0.2.7 spec/imw/schemes/http_spec.rb
imw-0.2.6 spec/imw/schemes/http_spec.rb
imw-0.2.5 spec/imw/schemes/http_spec.rb
imw-0.2.4 spec/imw/schemes/http_spec.rb
imw-0.2.3 spec/imw/schemes/http_spec.rb
imw-0.2.2 spec/imw/schemes/http_spec.rb
imw-0.2.1 spec/imw/schemes/http_spec.rb