Skip to content
Browse files

Don't generate docs during any of the unrelated specs in the integrat…

…ion spec.
  • Loading branch information...
1 parent 3e7fc5f commit 33241a366afc56df3ebd3f8506423c4ec84ce13b @alloy alloy committed Mar 18, 2012
Showing with 14 additions and 8 deletions.
  1. +0 −2 lib/cocoapods/docs_generator.rb
  2. +14 −6 spec/integration_spec.rb
View
2 lib/cocoapods/docs_generator.rb
@@ -92,8 +92,6 @@ def appledoc(options)
arguments += options
arguments += ['--print-settings'] if config.verbose?
arguments += files.map(&:to_s)
- #p arguments
- puts "appledoc #{arguments.join("' '")}"
Open3.popen3('appledoc', *arguments) do |i, o, e|
if config.verbose?
puts o.read.chomp
View
20 spec/integration_spec.rb
@@ -31,17 +31,22 @@ def set.specification
describe "A full (integration spec) installation for platform `#{platform}'" do
extend SpecHelper::TemporaryDirectory
- before do
- fixture('spec-repos/master') # ensure the archive is unpacked
-
- @config_before = config
+ def create_config!
Pod::Config.instance = nil
config.silent = true
config.repos_dir = fixture('spec-repos')
config.project_root = temporary_directory
config.doc_install = false
end
+ before do
+ fixture('spec-repos/master') # ensure the archive is unpacked
+
+ @config_before = config
+ create_config!
+ config.doc = false
+ end
+
after do
Pod::Config.instance = @config_before
end
@@ -131,6 +136,8 @@ def should_successfully_perform(command)
if Pod::DocsGenerator.appledoc_installed?
it "generates documentation of all pods by default" do
+ create_config!
+
podfile = Pod::Podfile.new do
self.platform :ios
dependency 'JSONKit', '1.4'
@@ -140,9 +147,10 @@ def should_successfully_perform(command)
installer = SpecHelper::Installer.new(podfile)
installer.install!
- File.directory?(config.project_pods_root + 'Documentation/JSONKit/html/')
+ doc = (config.project_pods_root + 'Documentation/JSONKit/html/index.html').read
+ doc.should.include?('<title>JSONKit (1.4) Reference</title>')
doc = (config.project_pods_root + 'Documentation/SSToolkit/html/index.html').read
- doc.should.include?('SSToolkit')
+ doc.should.include?('<title>SSToolkit (0.1.2) Reference</title>')
end
else
puts "[!] Skipping documentation generation specs, because appledoc can't be found."

0 comments on commit 33241a3

Please sign in to comment.
Something went wrong with that request. Please try again.