Sha256: 53cc100179a8a575560331b53d281ae85b8bba68829a99af695f5d2ee1b00bce

Contents?: true

Size: 1008 Bytes

Versions: 1

Compression:

Stored size: 1008 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
      expect(URI.directory?(uri_path)).to be_truthy
    end
  end

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

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

    it "is true" do
      expect(URI.directory?(uri_path)).to be_truthy
    end
  end

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

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

    it "is true" do
      expect(URI.directory?(uri_path)).to be_truthy
    end
  end

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

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

    it "is false" do
      expect(URI.directory?(uri_path)).to be_falsey
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mango-0.9.0 spec/lib/core_ext/uri_spec.rb