diff options
| author | John Keiser <john@johnkeiser.com> | 2016-08-22 12:02:29 -0700 |
|---|---|---|
| committer | John Keiser <john@johnkeiser.com> | 2016-08-22 13:44:20 -0700 |
| commit | 28a00bdf0511969215920f47c7338f4d214c8337 (patch) | |
| tree | 727efc3fa555f1123eb4176ca2b44a3bbe7f93f0 /spec/unit | |
| parent | d2def622dfdabe56ea638bed1a63af81275681c2 (diff) | |
| download | chef-28a00bdf0511969215920f47c7338f4d214c8337.tar.gz | |
Stop using obsolete URI.escape; use Addressable::URI instead.
See http://stackoverflow.com/questions/2824126/whats-the-difference-between-uri-escape-and-cgi-escape#answer-13059657 for details on why.
Diffstat (limited to 'spec/unit')
| -rw-r--r-- | spec/unit/provider/remote_file/local_file_spec.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/unit/provider/remote_file/local_file_spec.rb b/spec/unit/provider/remote_file/local_file_spec.rb index 31f14fbe45..6f345cadd1 100644 --- a/spec/unit/provider/remote_file/local_file_spec.rb +++ b/spec/unit/provider/remote_file/local_file_spec.rb @@ -17,6 +17,8 @@ # require "spec_helper" +require "uri" +require "addressable/uri" describe Chef::Provider::RemoteFile::LocalFile do @@ -47,7 +49,7 @@ describe Chef::Provider::RemoteFile::LocalFile do end describe "when given local windows path with spaces" do - let(:uri) { URI.parse(URI.escape("file:///z:/windows/path/foo & bar.txt")) } + let(:uri) { URI.parse(Addressable::URI.encode("file:///z:/windows/path/foo & bar.txt")) } it "returns a valid windows local path" do expect(fetcher.source_path).to eq("z:/windows/path/foo & bar.txt") end @@ -61,7 +63,7 @@ describe Chef::Provider::RemoteFile::LocalFile do end describe "when given unc windows path with spaces" do - let(:uri) { URI.parse(URI.escape("file:////server/share/windows/path/foo & bar.txt")) } + let(:uri) { URI.parse(Addressable::URI.encode("file:////server/share/windows/path/foo & bar.txt")) } it "returns a valid windows unc path" do expect(fetcher.source_path).to eq("//server/share/windows/path/foo & bar.txt") end |
