Sha256: 9a0a3937e373dea67b94d7dbd507c2a08e9e309d6fb115bfd52b35f6ff25e500

Contents?: true

Size: 985 Bytes

Versions: 3

Compression:

Stored size: 985 Bytes

Contents

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

3 entries across 3 versions & 1 rubygems

Version Path
mango-0.8.0 spec/lib/core_ext/uri_spec.rb
mango-0.7.1 spec/lib/core_ext/uri_spec.rb
mango-0.7.0 spec/lib/core_ext/uri_spec.rb