spec/command/deploy_spec.rb in cocoapods-deploy-0.0.5 vs spec/command/deploy_spec.rb in cocoapods-deploy-0.0.6
- old
+ new
@@ -1,15 +1,7 @@
require File.expand_path('../../spec_helper', __FILE__)
-class MockExternalSource
- def initialize
- end
-
- def fetch
- end
-end
-
module Pod
describe Command::Deploy do
before do
@command = Command.parse(%w{ deploy })
@@ -120,32 +112,19 @@
@transformer = DeployTransformer.new(nil, nil)
@transformer.stubs(:transform_dependency_name).with("Google/Analytics").returns(@dependency)
DeployTransformer.stubs(:new).returns(@transformer)
- @source = MockExternalSource.new
@command.stubs(:transform_podfile).returns(@podfile)
@command.stubs(:install)
end
- it 'should create new external source' do
- ExternalSources.expects(:from_dependency).with(@dependency, @podfile.defined_in_file).returns(@source)
- @source.stubs(:fetch)
- @command.run
- end
+ it 'should download source' do
+ downloader = DeployDownloader.new(nil)
+ downloader.expects(:download)
- it 'should fetch source' do
- ExternalSources.stubs(:from_dependency).returns(@source)
- @source.expects(:fetch)
+ DeployDownloader.stubs(:new).returns(downloader)
@command.run
end
-
- # TODO: Reducing duplicates
-
- # TODO: Patches
-
- # Figure out how to test external source here.
-
- # Figure out how to handle location
end
end
end