Sha256: 9458fb8718acdefe6e3f5f8f0c93fb01701bd8f38619ce500f72252ae5c7c8da

Contents?: true

Size: 525 Bytes

Versions: 2

Compression:

Stored size: 525 Bytes

Contents

require "test_helper.rb"

require "sup/util/uri"

describe Redwood::Util::Uri do
  describe ".build" do
    it "builds uri from hash" do
      components = {:path => "/var/mail/foo", :scheme => "mbox"}
      uri = Redwood::Util::Uri.build(components)
      assert_equal "mbox:/var/mail/foo", uri.to_s
    end

    it "expands ~ in path" do
      components = {:path => "~/foo", :scheme => "maildir"}
      uri = Redwood::Util::Uri.build(components)
      assert_equal "maildir:#{ENV["HOME"]}/foo", uri.to_s
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sup-1.2 test/unit/util/test_uri.rb
sup-1.1 test/unit/util/test_uri.rb