summaryrefslogtreecommitdiff
path: root/spec/ruby/library/uri/ftp/to_s_spec.rb
blob: e4e2832e86b152eee8ae3f0f2ea178d4e17d7edd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require File.expand_path('../../../../spec_helper', __FILE__)
require 'uri'


describe "URI::FTP#to_s" do
  before :each do
    @url = URI.parse('ftp://example.com')
  end

  it "escapes the leading /" do
    @url.path = '/foo'

    @url.to_s.should == 'ftp://example.com/%2Ffoo'
  end
end