Sha256: aa11f02899e43607f151ad3d03ab85d33f74ce5457e374f609e793c58312312b

Contents?: true

Size: 519 Bytes

Versions: 8

Compression:

Stored size: 519 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)
      uri.to_s.must_equal "mbox:/var/mail/foo"
    end

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sup-1.0 test/unit/util/test_uri.rb
sup-0.23 test/unit/util/test_uri.rb
sup-0.22.1 test/unit/util/test_uri.rb
sup-0.22.0 test/unit/util/test_uri.rb
sup-0.21.0 test/unit/util/test_uri.rb
sup-0.20.0 test/unit/util/test_uri.rb
sup-0.19.0 test/unit/util/test_uri.rb
sup-0.18.0 test/unit/util/test_uri.rb