Commit c229f47f authored by Fabio Pelosin's avatar Fabio Pelosin

[UserProjectIntegrator] Always return a Pathname in #workspace_path.

Closes #871
parent 03ab8617
......@@ -8,6 +8,8 @@
- CocoaPods updates the repositories by default.
[#872](https://github.com/CocoaPods/CocoaPods/issues/872)
- Fixed a crash which was present when the Podfile specifies a workspace.
[#871](https://github.com/CocoaPods/CocoaPods/issues/871)
###### Ancillary enhancements
......
......@@ -132,18 +132,17 @@ module Pod
end
end
#-----------------------------------------------------------------------#
private
# @!group Helpers.
# @!group Private Helpers
#-----------------------------------------------------------------------#
# @return [Pathname] the path where the workspace containing the Pods
# project and the user projects should be saved.
#
def workspace_path
if podfile.workspace_path
podfile.workspace_path
Pathname.new(podfile.workspace_path)
elsif user_project_paths.count == 1
project = user_project_paths.first.basename('.xcodeproj')
installation_root + "#{project}.xcworkspace"
......
......@@ -122,12 +122,12 @@ module Pod
#-----------------------------------------------------------------------#
describe "Helpers" do
describe "Private Helpers" do
it "uses the path of the workspace defined in the podfile" do
path = "a_path"
@podfile.workspace(path)
@integrator.send(:workspace_path).should == path + ".xcworkspace"
path = Pathname.new("a_path")
@podfile.workspace(path.to_s)
@integrator.send(:workspace_path).should == path.sub_ext(".xcworkspace")
end
it "names the workspace after the user project if needed" do
......
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