Commit 2463b914 authored by Eloy Duran's avatar Eloy Duran

A Subspec has the same platform as the top level spec.

parent 4d074081
...@@ -432,6 +432,10 @@ module Pod ...@@ -432,6 +432,10 @@ module Pod
top_level_parent.version top_level_parent.version
end end
def platform
top_level_parent.platform
end
def source def source
top_level_parent.source top_level_parent.source
end end
......
...@@ -286,6 +286,7 @@ describe "A Pod::Specification subspec" do ...@@ -286,6 +286,7 @@ describe "A Pod::Specification subspec" do
@spec = Pod::Spec.new do |s| @spec = Pod::Spec.new do |s|
s.name = 'MainSpec' s.name = 'MainSpec'
s.version = '1.2.3' s.version = '1.2.3'
s.platform = :ios
s.summary = 'A spec with subspecs' s.summary = 'A spec with subspecs'
s.source = { :git => '/some/url' } s.source = { :git => '/some/url' }
s.requires_arc = true s.requires_arc = true
...@@ -320,14 +321,10 @@ describe "A Pod::Specification subspec" do ...@@ -320,14 +321,10 @@ describe "A Pod::Specification subspec" do
end end
it "automatically forwards undefined attributes to the top level parent" do it "automatically forwards undefined attributes to the top level parent" do
@spec.subspecs.first.summary.should == @spec.summary [:version, :summary, :platform, :requires_arc, :compiler_flags].each do |attr|
@spec.subspecs.first.source.should == @spec.source @spec.subspecs.first.send(attr).should == @spec.send(attr)
@spec.subspecs.first.requires_arc.should == true @spec.subspecs.first.subspecs.first.send(attr).should == @spec.send(attr)
@spec.subspecs.first.compiler_flags.should == ' -fobjc-arc' end
@spec.subspecs.first.subspecs.first.summary.should == @spec.summary
@spec.subspecs.first.subspecs.first.source.should == @spec.source
@spec.subspecs.first.subspecs.first.requires_arc.should == true
@spec.subspecs.first.subspecs.first.compiler_flags.should == ' -fobjc-arc'
end end
it "returns subspecs by name" do it "returns subspecs by name" do
......
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