Commit 6aa0bb76 authored by Marius Rackwitz's avatar Marius Rackwitz

Minor change for edge case, more intuitive empty line generating

parent fdfca014
...@@ -35,10 +35,10 @@ module Pod ...@@ -35,10 +35,10 @@ module Pod
result = "" result = ""
result << generate_platform_import_header result << generate_platform_import_header
unless imports.empty? result << "\n"
imports.each do |import|
result << %|\n#import "#{import}"| imports.each do |import|
end result << %|#import "#{import}"\n|
end end
result result
......
...@@ -38,8 +38,6 @@ module Pod ...@@ -38,8 +38,6 @@ module Pod
def generate def generate
result = super result = super
result << "\n"
unique_prefix_header_contents = file_accessors.map do |file_accessor| unique_prefix_header_contents = file_accessors.map do |file_accessor|
file_accessor.spec_consumer.prefix_header_contents file_accessor.spec_consumer.prefix_header_contents
end.compact.uniq end.compact.uniq
......
...@@ -9,7 +9,7 @@ module Pod ...@@ -9,7 +9,7 @@ module Pod
it 'includes the imports' do it 'includes the imports' do
@gen.imports << 'header.h' @gen.imports << 'header.h'
@gen.generate.should == <<-EOS.strip_heredoc.chomp @gen.generate.should == <<-EOS.strip_heredoc
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "header.h" #import "header.h"
...@@ -31,6 +31,7 @@ module Pod ...@@ -31,6 +31,7 @@ module Pod
@gen.save_as(path) @gen.save_as(path)
path.read.should == <<-EOS.strip_heredoc path.read.should == <<-EOS.strip_heredoc
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
EOS EOS
end end
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