Commit 521c93c2 authored by Fabio Pelosin's avatar Fabio Pelosin

[Resolver] Add specs

parent 891c3fb8
......@@ -211,7 +211,9 @@ module Pod
#
def find_set_from_sources(dependency)
source = sources.find { |s| s.search(dependency) }
source.search(dependency)
if source
source.search(dependency)
end
end
# Ensures that a specification is compatible with the platform of a target.
......
......@@ -101,6 +101,15 @@ module Pod
e.message.should.match(/platform .* not compatible/)
end
it 'raises if unable to find a specification' do
Specification.any_instance.stubs(:all_dependencies).returns([Dependency.new('Windows')])
message = should.raise Informative do
@resolver.resolve
end.message
message.should.match /Unable to find a specification/
message.should.match /`Windows` dependent by BlocksKit/
end
it 'does not raise if all dependencies are supported by the platform of the target definition' do
lambda { @resolver.resolve }.should.not.raise
end
......
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