Commit 40bed656 authored by Marius Rackwitz's avatar Marius Rackwitz

Added a functional spec for telling the user that the Pods cannot be updated…

Added a functional spec for telling the user that the Pods cannot be updated unless they are installed
parent 9d8276ed
...@@ -44,6 +44,44 @@ module Pod ...@@ -44,6 +44,44 @@ module Pod
end end
end end
describe "tells the user that the Pods cannot be updated unless they are installed" do
extend SpecHelper::TemporaryRepos
before do
file = temporary_directory + 'Podfile'
File.open(file, 'w') do |f|
f.puts('platform :ios')
f.puts('pod "BananaLib", "1.0"')
end
podfile = Podfile.new do
platform :ios
pod 'BananaLib', '1.0'
end
specs = [
Specification.new do |s|
s.name = 'BananaLib'
s.version = '1.0'
end
]
Lockfile.generate(podfile, specs).write_to_disk(temporary_directory + 'Podfile.lock')
end
it "for a single missing Pod" do
Dir.chdir(temporary_directory) do
exception = lambda { run_command('update', 'Reachability', '--no-repo-update') }.should.raise Informative
exception.message.should.include "Pod `Reachability' is not installed and cannot be updated"
end
end
it "for multiple missing Pods" do
Dir.chdir(temporary_directory) do
exception = lambda { run_command('update', 'Reachability', 'BananaLib2', '--no-repo-update') }.should.raise Informative
exception.message.should.include "Pods `Reachability', `BananaLib2' are not installed and cannot be updated"
end
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