Commit ae33f827 authored by Eloy Durán's avatar Eloy Durán

Sort resolved specifications. Fixes #907.

parent 827cf407
...@@ -190,7 +190,7 @@ module Pod ...@@ -190,7 +190,7 @@ module Pod
# the name of the Pod. # the name of the Pod.
# #
def resolved_spec_names(pod) def resolved_spec_names(pod)
specs.select { |s| s.root.name == pod }.map(&:name).uniq specs.select { |s| s.root.name == pod }.map(&:name).uniq.sort
end end
# @return [Array<String>] The name of the specifications stored in the # @return [Array<String>] The name of the specifications stored in the
...@@ -200,7 +200,7 @@ module Pod ...@@ -200,7 +200,7 @@ module Pod
# the name of the Pod. # the name of the Pod.
# #
def sandbox_spec_names(pod) def sandbox_spec_names(pod)
sandbox_manifest.pod_names.select { |name| Specification.root_name(name) == pod }.uniq sandbox_manifest.pod_names.select { |name| Specification.root_name(name) == pod }.uniq.sort
end end
# @return [Specification] The root specification for the Pod with the # @return [Specification] The root specification for the Pod with the
......
...@@ -130,9 +130,9 @@ module Pod ...@@ -130,9 +130,9 @@ module Pod
@analyzer.send(:sandbox_pods).should == ['BananaLib'] @analyzer.send(:sandbox_pods).should == ['BananaLib']
end end
it "returns the name of the resolved specifications" do it "returns the name of the resolved specifications sorted by name" do
subspec = Spec.new(@spec, 'Subspec') subspec = Spec.new(@spec, 'Subspec')
@analyzer.stubs(:specs).returns([@spec, subspec]) @analyzer.stubs(:specs).returns([subspec, @spec])
@analyzer.send(:resolved_spec_names, 'BananaLib').should == ['BananaLib', 'BananaLib/Subspec'] @analyzer.send(:resolved_spec_names, 'BananaLib').should == ['BananaLib', 'BananaLib/Subspec']
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