Commit da8b99e3 authored by Fabio Pelosin's avatar Fabio Pelosin

[#197] Fix specs

parent f16f6e1e
...@@ -134,7 +134,7 @@ else ...@@ -134,7 +134,7 @@ else
change_log.should.not.include '1.3' change_log.should.not.include '1.3'
end end
if Pod::Generator::Documentation.appledoc_installed? if !`which appledoc`.strip.empty?
it "generates documentation of all pods by default" do it "generates documentation of all pods by default" do
create_config! create_config!
...@@ -148,9 +148,9 @@ else ...@@ -148,9 +148,9 @@ else
installer.install! installer.install!
doc = (config.project_pods_root + 'Documentation/JSONKit/html/index.html').read doc = (config.project_pods_root + 'Documentation/JSONKit/html/index.html').read
doc.should.include?('<title>JSONKit (1.4) Reference</title>') doc.should.include?('<title>JSONKit 1.4 Reference</title>')
doc = (config.project_pods_root + 'Documentation/SSToolkit/html/index.html').read doc = (config.project_pods_root + 'Documentation/SSToolkit/html/index.html').read
doc.should.include?('<title>SSToolkit (0.1.2) Reference</title>') doc.should.include?('<title>SSToolkit 0.1.2 Reference</title>')
end end
else else
puts "[!] Skipping documentation generation specs, because appledoc can't be found." puts "[!] Skipping documentation generation specs, because appledoc can't be found."
......
...@@ -20,14 +20,14 @@ describe Pod::Generator::Documentation do ...@@ -20,14 +20,14 @@ describe Pod::Generator::Documentation do
it 'returns the Pod documentation documentation files' do it 'returns the Pod documentation documentation files' do
@doc_installer.files.sort.should == [ @doc_installer.files.sort.should == [
@pod.root + "Classes/Banana.m", (@pod.root + "Classes/Banana.m").to_s,
@pod.root + "Classes/Banana.h", (@pod.root + "Classes/Banana.h").to_s,
].sort ].sort
end end
it 'returns the Pod documentation options' do it 'returns the Pod documentation options' do
@doc_installer.generate_appledoc_options.should == [ @doc_installer.appledoc_options.should == [
'--project-name', 'BananaLib (1.0)', '--project-name', 'BananaLib 1.0',
'--docset-desc', 'Full of chunky bananas.', '--docset-desc', 'Full of chunky bananas.',
'--project-company', 'Banana Corp, Monkey Boy', '--project-company', 'Banana Corp, Monkey Boy',
'--docset-copyright', 'Banana Corp, Monkey Boy', '--docset-copyright', 'Banana Corp, Monkey Boy',
...@@ -35,6 +35,7 @@ describe Pod::Generator::Documentation do ...@@ -35,6 +35,7 @@ describe Pod::Generator::Documentation do
'--ignore', '.m', '--ignore', '.m',
'--keep-undocumented-objects', '--keep-undocumented-objects',
'--keep-undocumented-members', '--keep-undocumented-members',
'--keep-intermediate-files',
'--index-desc', 'README', '--index-desc', 'README',
# TODO We need to either make this a hash so that options can be merged # 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. # or not use any defaults in case an options are specified.
...@@ -43,7 +44,7 @@ describe Pod::Generator::Documentation do ...@@ -43,7 +44,7 @@ describe Pod::Generator::Documentation do
] ]
end end
if Pod::Generator::Documentation.appledoc_installed? if !`which appledoc`.strip.empty?
before do before do
@doc_installer.generate @doc_installer.generate
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