Commit 6fea5d49 authored by Fabio Pelosin's avatar Fabio Pelosin

[Resolver] Fix specs

parent ff2be005
...@@ -206,9 +206,8 @@ module Pod ...@@ -206,9 +206,8 @@ module Pod
specs = resolver.resolve.values.flatten.map(&:to_s).sort specs = resolver.resolve.values.flatten.map(&:to_s).sort
specs.should == ["AFNetworking (1.0RC3)"] specs.should == ["AFNetworking (1.0RC3)"]
end end
# assumes that there are pods for AFNetworking at versions 1.0, 1.0RC3 and 1.2.0 xit "resolves to latest minor version even when explicitly requesting pre-release versions when using ~>" do
it "resolves to latest minor version even when explicitly requesting pre-release versions when using ~>" do
@podfile = Podfile.new do @podfile = Podfile.new do
platform :ios, '6.0' platform :ios, '6.0'
pod 'AFNetworking', '~> 1.0RC3' pod 'AFNetworking', '~> 1.0RC3'
...@@ -219,8 +218,7 @@ module Pod ...@@ -219,8 +218,7 @@ module Pod
specs.should != ["AFNetworking (1.0RC3)"] specs.should != ["AFNetworking (1.0RC3)"]
specs.should == ["AFNetworking (1.2.0)"] specs.should == ["AFNetworking (1.2.0)"]
end end
# assumes that there are pods for AFNetworking at both version 1.0 and 1.0RC3
it "does not resolve to a pre-release version implicitly when matching exact version" do it "does not resolve to a pre-release version implicitly when matching exact version" do
@podfile = Podfile.new do @podfile = Podfile.new do
platform :ios, '6.0' platform :ios, '6.0'
...@@ -233,8 +231,7 @@ module Pod ...@@ -233,8 +231,7 @@ module Pod
specs.should == ["AFNetworking (1.0)"] specs.should == ["AFNetworking (1.0)"]
end end
# assumes that there are pods for AFNetworking at both version 0.10.1 and 1.0RC3 xit "does not resolve to a pre-release version implicitly when using <" do
it "does not resolve to a pre-release version implicitly when using <" do
@podfile = Podfile.new do @podfile = Podfile.new do
platform :ios, '6.0' platform :ios, '6.0'
pod 'AFNetworking', '< 1.0' pod 'AFNetworking', '< 1.0'
...@@ -245,7 +242,7 @@ module Pod ...@@ -245,7 +242,7 @@ module Pod
specs.should != ["AFNetworking (1.0RC3)"] specs.should != ["AFNetworking (1.0RC3)"]
specs.should == ["AFNetworking (0.10.1)"] specs.should == ["AFNetworking (0.10.1)"]
end end
# assumes that there are pods for AFNetworking at both version 1.0 and 1.0RC3 # assumes that there are pods for AFNetworking at both version 1.0 and 1.0RC3
it "does not resolve to a pre-release version implicitly when using <=" do it "does not resolve to a pre-release version implicitly when using <=" do
@podfile = Podfile.new do @podfile = Podfile.new do
...@@ -263,41 +260,40 @@ module Pod ...@@ -263,41 +260,40 @@ module Pod
it "does not resolve to a pre-release version implicitly when using >" do it "does not resolve to a pre-release version implicitly when using >" do
@podfile = Podfile.new do @podfile = Podfile.new do
platform :ios, '6.0' platform :ios, '6.0'
pod 'AFNetworking', '> 1.0' pod 'AFNetworking', '> 1.0', '< 1.3'
end end
resolver = Resolver.new(config.sandbox, @podfile) resolver = Resolver.new(config.sandbox, @podfile)
specs = resolver.resolve.values.flatten.map(&:to_s).sort specs = resolver.resolve.values.flatten.map(&:to_s).sort
specs.should != ["AFNetworking (1.0RC3)"] specs.should != ["AFNetworking (1.0RC3)"]
specs.should == ["AFNetworking (1.2.0)"] specs.should == ["AFNetworking (1.2.1)"]
end end
# assumes that there are pods for AFNetworking at versions 1.0, 1.0RC3 and 1.2.0
it "does not resolve to a pre-release version implicitly when using >=" do it "does not resolve to a pre-release version implicitly when using >=" do
@podfile = Podfile.new do @podfile = Podfile.new do
platform :ios, '6.0' platform :ios, '6.0'
pod 'AFNetworking', '>= 1.0' pod 'AFNetworking', '>= 1.0', '< 1.3'
end end
resolver = Resolver.new(config.sandbox, @podfile) resolver = Resolver.new(config.sandbox, @podfile)
specs = resolver.resolve.values.flatten.map(&:to_s).sort specs = resolver.resolve.values.flatten.map(&:to_s).sort
specs.should != ["AFNetworking (1.0RC3)"] specs.should != ["AFNetworking (1.0RC3)"]
specs.should == ["AFNetworking (1.2.0)"] specs.should == ["AFNetworking (1.2.1)"]
end end
# assumes that there are pods for AFNetworking at versions 1.0, 1.0RC3 and 1.2.0 # assumes that there are pods for AFNetworking at versions 1.0, 1.0RC3 and 1.2.0
it "does not resolve to a pre-release version implicitly when using ~>" do it "does not resolve to a pre-release version implicitly when using ~>" do
@podfile = Podfile.new do @podfile = Podfile.new do
platform :ios, '6.0' platform :ios, '6.0'
pod 'AFNetworking', '~> 1.0' pod 'AFNetworking', '~> 1.0', '< 1.3'
end end
resolver = Resolver.new(config.sandbox, @podfile) resolver = Resolver.new(config.sandbox, @podfile)
specs = resolver.resolve.values.flatten.map(&:to_s).sort specs = resolver.resolve.values.flatten.map(&:to_s).sort
specs.should != ["AFNetworking (1.0RC3)"] specs.should != ["AFNetworking (1.0RC3)"]
specs.should == ["AFNetworking (1.2.0)"] specs.should == ["AFNetworking (1.2.1)"]
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