Adds specs. Indentation correction.

parent 9d3049a0
...@@ -389,10 +389,10 @@ module Pod ...@@ -389,10 +389,10 @@ module Pod
conflict.requirement.external_source || conflict.requirement.external_source ||
conflict.requirement.head?) conflict.requirement.head?)
) )
# Conflict was caused by not specifying an explicit version for the requirement #[name], # Conflict was caused by not specifying an explicit version for the requirement #[name],
# and there is no available stable version for the requirement. # and there is no available stable version for the requirement.
message = "There is no corresponding stable version for `#{name}`. " \ message = "There is no corresponding stable version for `#{name}`. " \
"You should explicitly specify the version in order to install a pre-release version of `#{name}`" "You should explicitly specify the version in order to install a pre-release version of `#{name}`"
elsif !conflict.existing elsif !conflict.existing
conflict.requirements.values.flatten.each do |r| conflict.requirements.values.flatten.each do |r|
unless search_for(r).empty? unless search_for(r).empty?
......
Pod::Spec.new do |s|
s.name = "PrereleaseMonkey"
s.version = "1.0-alpha1"
s.author = { "Funky Monkey" => "funky@monkey.local" }
s.summary = "🙈🙉🙊"
s.description = "See no evil! Hear no evil! Speak no evil!"
s.homepage = "http://httpbin.org/html"
s.source = { :git => "http://monkey.local/monkey.git", :tag => s.version.to_s }
s.license = 'MIT'
s.vendored_library = 'monkey.a'
end
Pod::Spec.new do |s|
s.name = "PrereleaseMonkey"
s.version = "1.0-beta1"
s.author = { "Funky Monkey" => "funky@monkey.local" }
s.summary = "🙈🙉🙊"
s.description = "See no evil! Hear no evil! Speak no evil!"
s.homepage = "http://httpbin.org/html"
s.source = { :git => "http://monkey.local/monkey.git", :tag => s.version.to_s }
s.license = 'MIT'
s.vendored_library = 'monkey.a'
end
...@@ -641,6 +641,27 @@ module Pod ...@@ -641,6 +641,27 @@ module Pod
specs.should != ['AFNetworking (1.0RC3)'] specs.should != ['AFNetworking (1.0RC3)']
specs.should == ['AFNetworking (1.2.1)'] specs.should == ['AFNetworking (1.2.1)']
end end
it 'raises when there is no explicit version specified and there are only pre-release versions' do
podfile = Podfile.new do
platform :ios
pod 'PrereleaseMonkey'
end
resolver = Resolver.new(config.sandbox, podfile, empty_graph, SourcesManager.all)
e = lambda { resolver.resolve }.should.raise Informative
e.message.should.match(/There is no corresponding stable version for `PrereleaseMonkey`/)
e.message.should.match(/You should explicitly specify the version in order to install a pre-release version of `PrereleaseMonkey`/)
end
it 'resolves when there is explicit pre-release version specified and there are only pre-release versions' do
podfile = Podfile.new do
platform :ios
pod 'PrereleaseMonkey', '1.0-beta1'
end
resolver = Resolver.new(config.sandbox, podfile, empty_graph, SourcesManager.all)
specs = resolver.resolve.values.flatten.map(&:to_s).sort
specs.should == ['PrereleaseMonkey (1.0-beta1)']
end
end end
end end
end 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