Sha256: 7d3d734690e40bdfc4e0d9f3cffb7f064c2d9ba0a2082e44cb36cb2a4c959a7c

Contents?: true

Size: 1003 Bytes

Versions: 4

Compression:

Stored size: 1003 Bytes

Contents

# encoding: UTF-8
require "spec_helper"

describe URI, ".directory?(uri_path)" do
  context "given an empty URI path" do
    let(:uri_path) { "" }

    it "is true" do
      URI.directory?(uri_path).should be_true
    end
  end

  #################################################################################################

  context "given a URI path of /" do
    let(:uri_path) { "/" }

    it "is true" do
      URI.directory?(uri_path).should be_true
    end
  end

  #################################################################################################

  context "given a URI path of /images/" do
    let(:uri_path) {  "/images/" }

    it "is true" do
      URI.directory?(uri_path).should be_true
    end
  end

  #################################################################################################

  context "given a URI path of /images" do
    let(:uri_path) {  "/images" }

    it "is false" do
      URI.directory?(uri_path).should be_false
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mango-0.6.3 spec/lib/core_ext/uri_spec.rb
mango-0.6.2 spec/lib/core_ext/uri_spec.rb
mango-0.6.1 spec/lib/core_ext/uri_spec.rb
mango-0.6.0 spec/lib/core_ext/uri_spec.rb