diff --git a/spec/cocoapods-downloaders/bazaar_spec.rb b/spec/cocoapods-downloaders/bazaar_spec.rb index abce98e..e2258b1 100644 --- a/spec/cocoapods-downloaders/bazaar_spec.rb +++ b/spec/cocoapods-downloaders/bazaar_spec.rb @@ -36,7 +36,7 @@ module Downloader tmp_folder('README').read.strip.should == 'Fourth Commit' end - describe "when the directory name has quotes" do + describe "when the directory name has quotes or spaces" do it 'checks out the head revision' do options = { :bzr => fixture('bazaar-repo') } downloader = Downloader.for_target(tmp_folder_with_quotes, options) diff --git a/spec/cocoapods-downloaders/git_spec.rb b/spec/cocoapods-downloaders/git_spec.rb index f122672..444ebcd 100644 --- a/spec/cocoapods-downloaders/git_spec.rb +++ b/spec/cocoapods-downloaders/git_spec.rb @@ -16,7 +16,7 @@ module Downloader end - it "checks out when the path contains quotes" do + it "checks out when the path contains quotes or spaces" do options = { :git => fixture('git-repo'), :commit => '7ad3a6c' } downloader = Downloader.for_target(tmp_folder_with_quotes, options) downloader.download diff --git a/spec/cocoapods-downloaders/http_spec.rb b/spec/cocoapods-downloaders/http_spec.rb index a33ab2d..0b46f0b 100644 --- a/spec/cocoapods-downloaders/http_spec.rb +++ b/spec/cocoapods-downloaders/http_spec.rb @@ -16,7 +16,7 @@ module Downloader tmp_folder('GoogleAdMobSearchAdsSDK/GADSearchRequest.h').read.strip.should =~ /Google Search Ads iOS SDK/ end - it 'should download file and unzip it when the target folder name contains quotes' do + it 'should download file and unzip it when the target folder name contains quotes or spaces' do options = { :http => 'http://dl.google.com/googleadmobadssdk/googleadmobsearchadssdkios.zip' } downloader = Downloader.for_target(tmp_folder_with_quotes, options) VCR.use_cassette('tarballs', :record => :new_episodes) { downloader.download } diff --git a/spec/cocoapods-downloaders/mercurial_spec.rb b/spec/cocoapods-downloaders/mercurial_spec.rb index cdba0dc..5d3621c 100644 --- a/spec/cocoapods-downloaders/mercurial_spec.rb +++ b/spec/cocoapods-downloaders/mercurial_spec.rb @@ -22,7 +22,7 @@ module Downloader tmp_folder('README').read.strip.should == 'second commit' end - describe "when the directory name has quotes" do + describe "when the directory name has quotes or spaces" do it "checks out a specific revision" do options = { :hg => fixture('mercurial-repo'), :revision => '46198bb3af96' } downloader = Downloader.for_target(tmp_folder_with_quotes, options) diff --git a/spec/cocoapods-downloaders/subversion_spec.rb b/spec/cocoapods-downloaders/subversion_spec.rb index ce7cd96..094104c 100644 --- a/spec/cocoapods-downloaders/subversion_spec.rb +++ b/spec/cocoapods-downloaders/subversion_spec.rb @@ -29,7 +29,7 @@ module Downloader tmp_folder('README').read.strip.should == 'unintersting' end - describe "when the directory name has quotes" do + describe "when the directory name has quotes or spaces" do it "checks out a specific revision" do options = { :svn => "file://#{fixture('subversion-repo')}", :revision => '1' } downloader = Downloader.for_target(tmp_folder_with_quotes, options) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 9369a3f..5a35d2a 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -50,7 +50,7 @@ def tmp_folder(path = '') end def tmp_folder_with_quotes(path = '') - return tmp_folder File.join("a'\"b", path) + return tmp_folder File.join("a' \"b", path) end def fixture(path)