Commit ed78b00b authored by Daniel Tomlinson's avatar Daniel Tomlinson

make functional tests pass

parent a5e83f3f
......@@ -91,7 +91,7 @@ module Pod
def spec_sets
@spec_sets ||= begin
analyzer.send(:update_repositories) unless config.skip_repo_update?
aggregate = Source::Aggregate.new(analyzer.sources.map(&:repo))
aggregate = Source::Aggregate.new(analyzer.sources.map)
installed_pods.map do |pod_name|
aggregate.search(Dependency.new(pod_name))
end.compact.uniq
......
require File.expand_path('../../../../spec_helper', __FILE__)
require 'webmock'
module Pod
describe Command::Repo::Update do
......@@ -8,6 +9,14 @@ module Pod
before do
set_up_test_repo
config.repos_dir = SpecHelper.tmp_repos_path
WebMock::API.stub_request(:get, "https://api.github.com/repos/cocoapods/specs/commits/master")
.with(:headers => {'Accept'=>'application/vnd.github.chitauri-preview+sha'})
.to_return(:status => 200, :body => '', :headers => {})
end
after do
WebMock.reset!
end
it 'updates a repository' do
......
require File.expand_path('../../spec_helper', __FILE__)
require 'webmock'
module Bacon
class Context
alias_method :after_webmock, :after
def after(&block)
after_webmock do
block.call
WebMock.reset!
end
end
end
end
def set_up_test_repo_for_update
set_up_test_repo
upstream = SpecHelper.temporary_directory + 'upstream'
......@@ -308,6 +296,10 @@ module Pod
describe 'Updating Sources' do
extend SpecHelper::TemporaryRepos
after do
WebMock.reset!
end
it 'updates source backed by a git repository' do
set_up_test_repo_for_update
WebMock::API.stub_request(:get, "https://api.github.com/repos/cocoapods/specs/commits/master")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment