Commit 8ae9f97c authored by Fabio Pelosin's avatar Fabio Pelosin

[Specs] Forgot to update the specs for the previous changes :-)

Bonus: stray #puts for debug.
parent 1bffe1cd
...@@ -75,7 +75,6 @@ module Pod ...@@ -75,7 +75,6 @@ module Pod
# it might prevent a bundle from being deleted # it might prevent a bundle from being deleted
dirs = Dir.glob(root + "**/*", File::FNM_DOTMATCH) dirs = Dir.glob(root + "**/*", File::FNM_DOTMATCH)
dirs = dirs.reject { |d| d.end_with? ('.', '..') || !File.directory?(d) }.sort_by(&:length).reverse dirs = dirs.reject { |d| d.end_with? ('.', '..') || !File.directory?(d) }.sort_by(&:length).reverse
dirs.each { |d| puts d }
dirs.each { |d| FileUtils.rm_rf(d) if File.symlink?(d) || (Dir.entries(d) == %w[ . .. ]) } dirs.each { |d| FileUtils.rm_rf(d) if File.symlink?(d) || (Dir.entries(d) == %w[ . .. ]) }
end end
......
...@@ -13,11 +13,11 @@ describe Pod::Generator::Markdown do ...@@ -13,11 +13,11 @@ describe Pod::Generator::Markdown do
it "returns a correctly formatted title string" do it "returns a correctly formatted title string" do
@pods[0].unstub(:license_text) @pods[0].unstub(:license_text)
@pods[0].unstub(:name) @pods[0].unstub(:name)
@markdown.title_from_string("A Title").should.equal "A Title\n-------\n" @markdown.title_from_string("A Title", 2).should.equal "## A Title"
end end
it "returns a correctly formatted license string for each pod" do it "returns a correctly formatted license string for each pod" do
@markdown.string_for_pod(@pods[0]).should.equal "POD_NAME\n--------\nLICENSE_TEXT\n" @markdown.string_for_pod(@pods[0]).should.equal "\n## POD_NAME\n\nLICENSE_TEXT\n"
end end
it "returns a correctly formatted markdown string for the target" do it "returns a correctly formatted markdown string for the target" do
...@@ -25,7 +25,7 @@ describe Pod::Generator::Markdown do ...@@ -25,7 +25,7 @@ describe Pod::Generator::Markdown do
@markdown.stubs(:header_text).returns("HEADER_TEXT") @markdown.stubs(:header_text).returns("HEADER_TEXT")
@markdown.stubs(:footnote_title).returns("") # Test that extra \n isn't added for empty strings @markdown.stubs(:footnote_title).returns("") # Test that extra \n isn't added for empty strings
@markdown.stubs(:footnote_text).returns("FOOTNOTE_TEXT") @markdown.stubs(:footnote_text).returns("FOOTNOTE_TEXT")
@markdown.licenses.should.equal "HEADER_TITLE\n------------\nHEADER_TEXT\nPOD_NAME\n--------\nLICENSE_TEXT\nFOOTNOTE_TEXT\n" @markdown.licenses.should.equal "# HEADER_TITLE\nHEADER_TEXT\n\n## POD_NAME\n\nLICENSE_TEXT\nFOOTNOTE_TEXT\n"
end end
it "writes a markdown file to disk" do it "writes a markdown file to disk" do
......
...@@ -37,9 +37,10 @@ describe Pod::LocalPod do ...@@ -37,9 +37,10 @@ describe Pod::LocalPod do
].sort ].sort
end end
it 'returns an expanded list of absolute clean paths' do it 'returns an expanded list the files to clean' do
#TODO: there are some temporary files that prevent a complete check clean_files = @pod.clean_files.map { |p| p.to_s }
@pod.clean_paths.map { |p| p.relative_path_from(@sandbox.root).to_s }.should.include 'BananaLib/sub-dir/sub-dir-2/somefile.txt' clean_files.should.include "#{@sandbox.root}/BananaLib/.git/config"
clean_files.reject { |p| p.to_s.include?('/.git/') }.should == ["#{@sandbox.root}/BananaLib/sub-dir/sub-dir-2/somefile.txt"]
end end
it 'returns an expanded list of resources, relative to the sandbox root' do it 'returns an expanded list of resources, relative to the sandbox root' 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