Commit 34b12c12 authored by Eloy Duran's avatar Eloy Duran

Found cause of problem with most failures on Travis, the .git directory was…

Found cause of problem with most failures on Travis, the .git directory was removed from the BananaLib fixture tarball.
parent 9171cbf7
...@@ -10,7 +10,7 @@ describe "Pod::Downloader" do ...@@ -10,7 +10,7 @@ describe "Pod::Downloader" do
it "check's out a specific commit" do it "check's out a specific commit" do
@pod.specification.stubs(:source).returns( @pod.specification.stubs(:source).returns(
:git => fixture('banana-lib'), :commit => '02467b074d4dc9f6a75b8cd3ab80d9bf37887b01' :git => fixture('banana-lib'), :commit => 'fd56054'
) )
downloader = Pod::Downloader.for_pod(@pod) downloader = Pod::Downloader.for_pod(@pod)
downloader.download downloader.download
......
...@@ -34,8 +34,10 @@ config.repos_dir = SpecHelper.tmp_repos_path ...@@ -34,8 +34,10 @@ config.repos_dir = SpecHelper.tmp_repos_path
require 'tmpdir' require 'tmpdir'
# TODO why is this no longer using SpecHelper::TemporaryDirectory ?
def temporary_sandbox def temporary_sandbox
Pod::Sandbox.new(Pathname.new(Dir.mktmpdir + "/Pods")) Pod::Sandbox.new(Pathname.new(Dir.mktmpdir + "/Pods"))
#Pod::Sandbox.new(temporary_directory + "Pods")
end end
def fixture_spec(name) def fixture_spec(name)
......
...@@ -2,7 +2,6 @@ require File.expand_path('../../spec_helper', __FILE__) ...@@ -2,7 +2,6 @@ require File.expand_path('../../spec_helper', __FILE__)
describe Pod::DocsGenerator do describe Pod::DocsGenerator do
before do before do
@sandbox = temporary_sandbox @sandbox = temporary_sandbox
@pod = Pod::LocalPod.new(fixture_spec('banana-lib/BananaLib.podspec'), @sandbox) @pod = Pod::LocalPod.new(fixture_spec('banana-lib/BananaLib.podspec'), @sandbox)
...@@ -11,6 +10,10 @@ describe Pod::DocsGenerator do ...@@ -11,6 +10,10 @@ describe Pod::DocsGenerator do
@doc_installer.generate @doc_installer.generate
end end
after do
@sandbox.implode
end
it 'returns reads correctly the Pod documentation' do it 'returns reads correctly the Pod documentation' do
@doc_installer.options.should == { @doc_installer.options.should == {
:html => 'http://banana-corp.local/banana-lib/docs.html', :html => 'http://banana-corp.local/banana-lib/docs.html',
...@@ -39,17 +42,15 @@ describe Pod::DocsGenerator do ...@@ -39,17 +42,15 @@ describe Pod::DocsGenerator do
'--keep-undocumented-objects', '--keep-undocumented-objects',
'--keep-undocumented-members', '--keep-undocumented-members',
'--index-desc', 'README', '--index-desc', 'README',
# TODO We need to either make this a hash so that options can be merged
# or not use any defaults in case an options are specified.
'--project-company', 'Banana Corp', '--project-company', 'Banana Corp',
'--company-id', 'com.banana' '--company-id', 'com.banana'
] ]
end end
if Pod::DocsGenerator.appledoc_installed? if Pod::DocsGenerator.appledoc_installed?
it 'it creates the documenation directory' do it 'creates the html' do
File.directory?(@sandbox.root + "Documentation").should.be.true
end
it 'it creates the html' do
File.directory?(@sandbox.root + "Documentation/BananaLib/html").should.be.true File.directory?(@sandbox.root + "Documentation/BananaLib/html").should.be.true
index = (@sandbox.root + 'Documentation/BananaLib/html/index.html').read index = (@sandbox.root + 'Documentation/BananaLib/html/index.html').read
index.should.include?('BananaObj') index.should.include?('BananaObj')
......
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