Commit de5b9a1c authored by Samuel Giddins's avatar Samuel Giddins

[SourcesManager] Dont return non-functioning master sources

parent fdf990bb
......@@ -103,7 +103,7 @@ module Pod
# @return [Array<Source>] The CocoaPods Master Repo source.
#
def master
sources(['master'])
sources(['master']).select { |s| s.repo.directory? }
end
# Search the appropriate sources to match the set for the given dependency.
......
......@@ -431,6 +431,11 @@ module Pod
SourcesManager.master_repo_dir.to_s.should.match %r{fixtures/spec-repos/master}
end
it 'returns an empty array for master sources when the master repo has not been set up' do
Pathname.any_instance.stubs(:directory?).returns(false)
SourcesManager.master.should == []
end
it 'returns whether the master repo is functional' do
SourcesManager.master_repo_functional?.should.be.true
config.repos_dir = SpecHelper.temporary_directory
......
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