Commit b86625e6 authored by Fabio Pelosin's avatar Fabio Pelosin

[Platform#==] Check for deployment target.

parent 43e79bd6
...@@ -30,7 +30,7 @@ module Pod ...@@ -30,7 +30,7 @@ module Pod
if other_platform_or_symbolic_name.is_a?(Symbol) if other_platform_or_symbolic_name.is_a?(Symbol)
@symbolic_name == other_platform_or_symbolic_name @symbolic_name == other_platform_or_symbolic_name
else else
self == (other_platform_or_symbolic_name.name) self.name == (other_platform_or_symbolic_name.name) && self.deployment_target == other_platform_or_symbolic_name.deployment_target
end end
end end
......
...@@ -18,6 +18,11 @@ describe Pod::Platform do ...@@ -18,6 +18,11 @@ describe Pod::Platform do
@platform.should == Pod::Platform.new(:ios) @platform.should == Pod::Platform.new(:ios)
end end
it "can be compared for equality with another platform with the same symbolic name and the same deployment target" do
@platform.should.not == Pod::Platform.new(:ios, '4.0')
Pod::Platform.new(:ios, '4.0').should == Pod::Platform.new(:ios, '4.0')
end
it "can be compared for equality with a matching symbolic name (backwards compatibility reasons)" do it "can be compared for equality with a matching symbolic name (backwards compatibility reasons)" do
@platform.should == :ios @platform.should == :ios
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