Commit 5699bf84 authored by Jesper84's avatar Jesper84 Committed by Fabio Pelosin

[Command::Lib::Create] Show link to Making a CocoaPod guide

Closes #1644
Closes #1683
parent f9fa8db6
...@@ -44,6 +44,7 @@ module Pod ...@@ -44,6 +44,7 @@ module Pod
TEMPLATE_REPO = "https://github.com/CocoaPods/pod-template.git" TEMPLATE_REPO = "https://github.com/CocoaPods/pod-template.git"
TEMPLATE_INFO_URL = "https://github.com/CocoaPods/pod-template" TEMPLATE_INFO_URL = "https://github.com/CocoaPods/pod-template"
CREATE_NEW_POD_INFO_URL = "http://guides.cocoapods.org/making/making-a-cocoapod"
# Clones the template from the remote in the working directory using # Clones the template from the remote in the working directory using
# the name of the Pod. # the name of the Pod.
...@@ -74,6 +75,7 @@ module Pod ...@@ -74,6 +75,7 @@ module Pod
# #
def print_info def print_info
UI.puts "\nTo learn more about the template see `#{TEMPLATE_INFO_URL}`." UI.puts "\nTo learn more about the template see `#{TEMPLATE_INFO_URL}`."
UI.puts "To learn more about creating a new pod, see `#{CREATE_NEW_POD_INFO_URL}`."
end end
end end
......
require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../../../spec_helper', __FILE__)
require 'xcodeproj'
module Pod module Pod
describe Command::Lib::Create do describe Command::Lib::Create do
it "complains if wrong parameters" do it "complains if wrong parameters" do
...@@ -30,5 +28,19 @@ module Pod ...@@ -30,5 +28,19 @@ module Pod
end end
end end
end end
end
describe Command::Lib do
it "should create a new dir for the newly created pod" do
run_command('lib', 'create', 'TestPod')
Dir.chdir(temporary_directory) do
Pathname.new(temporary_directory + 'TestPod').exist?.should == true
end
end
it "should show link to new pod guide after creation" do
output = run_command('lib', 'create', 'TestPod')
output.should.include? 'http://guides.cocoapods.org/making/making-a-cocoapod'
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