Skip to content

Commit

Permalink
Preparing for downloader code.
Browse files Browse the repository at this point in the history
  • Loading branch information
James Campbell committed Mar 15, 2016
1 parent 5460088 commit a99df3d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/cocoapods-deploy/deploy_downloader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 9,8 @@ def initialize(dependency)

def download(config)
# TODO: Method for looping through dependency
#source = ExternalSources.from_dependency(dependency, config.podfile.defined_in_file)
#source.fetch(config.sandbox)
source = ExternalSources.from_dependency(dependency, config.podfile.defined_in_file)
source.fetch(config.sandbox)
end
end
end
2 changes: 1 addition & 1 deletion spec/deploy_analyzer_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 1,4 @@
require File.expand_path('../../spec_helper', __FILE__)
require File.expand_path('../spec_helper', __FILE__)

module Pod
describe DeployAnalyzer do
Expand Down
21 changes: 18 additions & 3 deletions spec/deploy_downloader_spec.rb
Original file line number Diff line number Diff line change
@@ -1,13 1,28 @@
require File.expand_path('../../spec_helper', __FILE__)
require File.expand_path('../spec_helper', __FILE__)

class MockExternalSource
def initialize
end

def fetch
end
end

module Pod
describe DeployDownloader do
it "should download source from main repo" do

before do
@downloader = DeployDownloader.new(nil)
@source = MockExternalSource.new
end

it "should download source from external repo" do
it "should download source from main repo" do
ExternalSources.stubs(:from_dependency).returns(@source)
@source.expects(:fetch)
@downloader.download(nil)
end

it "should download source from external repo" do
end
end
end
2 changes: 1 addition & 1 deletion spec/deploy_installer_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 1,4 @@
require File.expand_path('../../spec_helper', __FILE__)
require File.expand_path('../spec_helper', __FILE__)

module Pod
describe DeployInstaller do
Expand Down
2 changes: 1 addition & 1 deletion spec/deploy_transformer_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 1,4 @@
require File.expand_path('../../spec_helper', __FILE__)
require File.expand_path('../spec_helper', __FILE__)

def transform_podfile(lockfile, sandbox, podfile)
transformer = Pod::DeployTransformer.new(lockfile, sandbox)
Expand Down

0 comments on commit a99df3d

Please sign in to comment.