Commit d230d8e3 authored by Eloy Duran's avatar Eloy Duran

Fix integration spec, which was trying to assign a source to subspecs.

parent f72eedbd
......@@ -270,6 +270,10 @@ module Pod
@parent ? @parent.top_level_parent : self
end
def subspec?
!@parent.nil?
end
def subspec(name, &block)
subspec = Specification.new(self, name, &block)
@subspecs << subspec
......
......@@ -9,6 +9,7 @@ module SpecHelper
def specs_by_target
@specs_by_target ||= super.tap do |hash|
hash.values.flatten.each do |spec|
next if spec.subspec?
source = spec.source
source[:git] = SpecHelper.fixture("integration/#{spec.name}").to_s
spec.source = source
......@@ -167,8 +168,16 @@ else
installer = SpecHelper::Installer.new(podfile)
installer.install!
# TODO might be nicer looking to not show the dependencies of the top level spec for each subspec (Reachability).
YAML.load(installer.lock_file.read).should == {
"PODS" => [{ "ASIHTTPRequest (1.8.1)" => ["Reachability"] }, "JSONKit (1.4)", "Reachability (3.0.0)"],
"PODS" => [{ "ASIHTTPRequest (1.8.1)" => ["ASIHTTPRequest/ASIWebPageRequest (= 1.8.1)",
"ASIHTTPRequest/CloudFiles (= 1.8.1)",
"ASIHTTPRequest/S3 (= 1.8.1)",
"Reachability"]},
{ "ASIHTTPRequest/ASIWebPageRequest (1.8.1)" => ["Reachability"] },
{ "ASIHTTPRequest/CloudFiles (1.8.1)" => ["Reachability"] },
{ "ASIHTTPRequest/S3 (1.8.1)" => ["Reachability"] },
"JSONKit (1.4)", "Reachability (3.0.0)"],
"DEPENDENCIES" => ["ASIHTTPRequest", "JSONKit (= 1.4)"]
}
......
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